Let the cost of each pencil be Rs. x and the cost of each pen be Rs. y.
By problem 5x + 7y = 50
7x + 5y = 46
'

The lines are intersecting at the point (3, 5).
x = 3 and y = 5 is the solution of given equations.
∴ Cost of one pencil = Rs. 3 and pen = Rs. 5