Solve the system
Choose elimination and decide which variable to remove. The second equation has coefficient on both unknowns, so scaling it is cheap. Multiplying it by makes the coefficients match:
Subtract to eliminate .
The coefficient is the price difference, which is why this method is so natural for two-price problems.
Solve for and keep it exact.
Converting to a fraction avoids rounding drift; the decimal is only an approximation.
Back-substitute for .
Check both equations exactly. The sum: . The value equation, cleared of decimals by multiplying through by :
which is . Note that a rounded pair such as , fails this check — it gives , three units too high.
Need to solve a different problem like this? Open the solver →