Let price of fan = rs X
Price of table lamp =rs (2/3) X
Total money spent on 12 table lamps & 2 fans
= 8X + 2X
= 10X
Let total money with him be Y
(3/5)Y = 10X
Y= 50X/3
Cost of table lamp = (2/3) X
If he had spent all his money on table lamp
Total table lamp = 25
For second part
Money left , (2y/5) = (20X/3)
Money spent on 4 fans = 4X
Money left = 8X/3
With this total table lamp = 4
So he bought = 12+4 = 16 table lamp altogether
Therefore total table lamp he bought altogether = 16