I don't see any simple way to do this with a single command, at least not in the shell. Directly replacing blocks of text in the middle of a file like this is not a trivial thing.
The logical solution is simply to use
sed (or a similar tool) to extract and copy lines 0-499 from the first file into a temporary file, then take lines 11,000-16,000 from the second file and append it to the first batch, and finally append lines 15,001+ from the first file again. Then you can overwrite the original with the new file at the end.
Code:
sed -n '1,499 p' inputfileA >outputfile
sed -n '11000,16000 p' inputfileB >>outputfile
sed -n '15001,$ p' inputfileA >>outputfile
mv outputfile inputfileA
The
> file redirector in the first command either creates a new file or overwrites an existing one. The
>> in the following lines will append to an existing file. You can use
>> in the first line too, if you're sure the output file doesn't already exist.
$ in this case represents the last line of the file.
Using a temp file also allows you to protect the original data until you're sure the operation completed successfully.