A boy buys a pen and 2 pencils. The pen costs 50 pence. The pencils cost X pence each. How much did he spend?

He spent 50 + 2X pence.

50 + 2 x is all you can say.