What two whole numbers is 352 and their sum is 38

The product of 2 numbers is 352 and their sum is 38
Assume that the 2 numbers are x and y, then
[tex]\begin{gathered} x+y=38\rightarrow(1) \\ xy=352\rightarrow(2) \end{gathered}[/tex]Use equation (1) to find y in terms of x
Subtract x from both sides
[tex]\begin{gathered} x-x+y=38-x \\ y=38-x\rightarrow(3) \end{gathered}[/tex]Substitute y in equation (2) by equation (3)
[tex]x(38-x)=352[/tex]Simplify the left side and subtract 352 from both sides
[tex]\begin{gathered} (x)(38)-(x)(x)=352 \\ 38x-x^2=352 \\ 38x-x^2-352=352-352 \\ -x^2+38x-352=0 \end{gathered}[/tex]Multiply each term by -1
[tex]x^2-38x+352=0[/tex]Factor the left side into 2 factors
[tex]\begin{gathered} x^2=(x)(x) \\ 352=(-22)(-16) \\ (-22)(x)+(-16)(x)=-38x \\ (x-22),(x-16) \end{gathered}[/tex]The factors are (x - 22) and (x - 16)
[tex]\begin{gathered} x^2-38x+352=(x-22)(x-16) \\ (x-22)(x-16)=0 \end{gathered}[/tex]Equate each factor by 0 to find x
[tex]x-22=0[/tex]Add 22 to each side
[tex]\begin{gathered} x-22+22=0+22 \\ x=22 \end{gathered}[/tex]OR
[tex]x-16=0[/tex]Add