Why is there such a large price difference between the A350 and B787?
Those prices are not the actual prices airlines pay for those planes. They get big discounts and more complex contractual terms. It's not like buying a box of pasta.
In conclusion, you can't assume that the price difference means a different cost of the components for the manufacturer