Answer:
x = 1.3
Explanation:
cost of rice for 12kg = 12 * x ($x for each kg)
cost of potatoes for 7kg = 7 * (x+1)
total cost = 12 * x + 7 * (x+1) = 31.7
12x + 7x + 7 = 31.7
19x + 7 = 31.7
subtract 7 from both sides to isolate the variable and its coefficient
19x = 24.7
divide both sides by 19 to find x
x = 1.3