so here is how you can answer this: 
Your commission must be equal to the sum of the 10% of the value of the rug and the 15% of the value of the furniture and equate this to the value of your commission. Translate this to a mathematical equation, you would get, 
Commission = (10%) (value of rugs) + (15%) (value of furniture). 
substituting the known values, 
 
5000 =.1 * x + .15 * 12500. 
Now it's a matter of finding for x. You should get, 
 x = $31,250.