Let the cost of one pen and one pencil be x,y respectively.
Since, we have
x+y=12 ……. (1)
5x+3y=56 ..….. (2)
On solving, from equations(1)×5−equation(2), we get
5x+5y=60
5x+3y=56
− − − ––––––––––––––––––
⇒2y=4
⇒y=2
Substitute y=2 in equation(1), we get
⇒x+2=12
⇒x=12−2
⇒x=10
Hence, the cost of one pen is Rs 10 and one pencil is Rs 2.