Pls answer! I don’t know math at all

The solutions of the system of equations are (–2, 4) or (–5, 1).
Solution:
Given equations are:
[tex]y=x+6[/tex] – – – – (1)
[tex]y=x^{2}+8 x+16[/tex] – – – – (2)
Equate the values of y.
[tex]x+6=x^{2}+8 x+16[/tex]
Subtract 6 from both sides of the equation.
[tex]x=x^{2}+8 x+10[/tex]
Subtract x from both sides of the equation.
[tex]0=x^{2}+7 x+10[/tex]
Switch the sides.
[tex]x^{2}+7 x+10=0[/tex]
Factor this polynomial, we get
[tex](x+2)(x+5)=0[/tex]
x + 2 = 0 (or) x + 5 = 0
x = –2 (or) x = –5
Substitute x = –2 in equation (1),
y = –2 + 6
y = 4
Substitute x = –5 in equation (1),
y = –5 + 6
y = 1
The solutions of the system of equations are (–2, 4) or (–5, 1).