Someone please help me with this question I'm struggling

[tex]g(x) = - 2x + 1 \\ 5 = - 2x + 1[/tex]
Solve for the x-term.
[tex]2x = - 5 + 1 \\ 2x = - 4 \\ x = \frac{ - 4}{2} \\ x = \frac{ \cancel{ - 4} \: \: \: - 2}{ \cancel{2} \: \: \: 1} \Longrightarrow \: \frac{ - 2}{1} \\ x = - 2[/tex]
Answer Check
Substitute x = -2 in the equation.
[tex]5 = - 2( - 2) + 1 \\ 5 = 4 + 1 \\ 5 = 5[/tex]
The equation is true. Therefore x = -2 is the answer.
x = -2