Let the price of a chair be C and that of a table be T.
So, as per the problem, 10C=4T
or, T=2.5C
Again, 15C+2T=4000
Replacing T by 2.5 C, 15C+2(2.5C)=4000
or, 20C=4000
or C=200
So, the price of 1 chair is 200
The price of a table is T=2.5C=500
So, 12C+3T=12*200+3*500=3900
Answer is 3900