Find Two Numbers Given Their Sum and Product

A classic algebra problem, worked out step by step by Dr. E — with the full reasoning behind every move, a video walkthrough, and a free practice worksheet.

➗ Algebra🎬 Video solution📄 Free worksheet
The Problem
x y + x + y = 12 · x · y = 35
Two unknowns, two clues

Two numbers have a sum of 12 and a product of 35. Find the two numbers.

Video solution coming soon. Dr. E walks through this exact problem on the whiteboard, step by step.

Subscribe on YouTube so you don't miss it →
Step-by-Step Solution
1
Set up the two equations.
Call the numbers x and y: x + y = 12 and x · y = 35.
2
Substitute.
From the first equation, y = 12 − x. Put that into the product: x(12 − x) = 35.
3
Rearrange into a quadratic.
x² − 12x + 35 = 0.
Pattern: a sum-and-product problem always becomes x² − (sum)x + (product) = 0.
4
Factor and solve.
Two numbers that multiply to 35 and add to 12 are 5 and 7: (x − 5)(x − 7) = 0, so x = 5 or x = 7 — the same pair either way.
5
Check both conditions.
5 + 7 = 12 ✓ and 5 × 7 = 35 ✓.
Answer the numbers are 5 and 7 A sum-and-product question is really a hidden quadratic: the numbers are the roots of x² − (sum)x + (product) = 0.

💡 Why this works — the shortcut to remember

If two numbers add to S and multiply to P, they are the roots of x² − Sx + P = 0 — the same fact you use every time you factor a quadratic, just read forwards. Once you spot it, you can often jump straight to "what multiplies to 35 and adds to 12?"

Extension question: sum 12 and product 40 gives x² − 12x + 40 = 0, which has no real factors — a clean lead-in to the discriminant.

← Browse all solved problems