Solution:
Suppose the cost of 1 pen and 1 pencil are Rs. and Rs. respectively.
Then according to the question
Adding equation(i) and equation(ii), we obtain
Subtracting equation(i) from equation(ii), we obtain
Now, adding equation(iii) and equation(iv), we obtain
Substituting in equation(iii), we get
As a result, the cost of 1 pen and 1 pencil are respectively Rs.16 and Rs.5.