I'm not interested in the expenses, simply puzzled why Lockheed did not stretch the L-1011 to compete with the MD-11.
But expense is at the heart of the answer to your original question. Stretching the plane significantly would have meant a wing re-design. Incidentally, the L-1011 program was cancelled in 1982, long before the MD
-11 existed. Lockheed got out of the business because they were losing money on every L-1011 they produced. They had no interest in sustaining production, especially if they had to invest more money in a product line that bankrupted them. I wish they did, but they didn't.
All you need to do is research the topic on the internet, rather than here. There are lots of L-1011 sites on there.