Let the two numbers be \( x \) and \( y \). According to the problem, we have the following two equations:
- \( x + y = 22 \)
- \( x \cdot y = 120 \)
You can solve these equations simultaneously. From the first equation, express \( y \) in terms of \( x \):
\[ y = 22 - x \]
Now, substitute this expression for \( y \) into the second equation:
\[ x(22 - x) = 120 \]
Expanding this gives:
\[ 22x - x^2 = 120 \]
Rearranging the equation, we get a quadratic equation:
\[ x^2 - 22x + 120 = 0 \]
Next, we can use the quadratic formula \( x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \), where \( a = 1, b = -22, c = 120 \).
Calculating the discriminant:
\[ b^2 - 4ac = (-22)^2 - 4 \cdot 1 \cdot 120 = 484 - 480 = 4 \]
Now, applying the quadratic formula:
\[ x = \frac{22 \pm \sqrt{4}}{2 \cdot 1} = \frac{22 \pm 2}{2} \]
This yields two potential values for \( x \):
- \( x = \frac{24}{2} = 12 \)
- \( x = \frac{20}{2} = 10 \)
Now substituting back to find \( y \):
- If \( x = 12 \), then \( y = 22 - 12 = 10 \).
- If \( x = 10 \), then \( y = 22 - 10 = 12 \).
Thus, the two numbers are 10 and 12.