The given equation is
[tex]y=-x+2[/tex]We have to find a new line perpendicular to the given line and must pass through P(-5,7).
First, we use the definition of perpendicularity for two lines.
[tex]m_1\cdot m_2=-1[/tex]Where one of the slopes is equal to -1 because the coefficient of x in the given equation is -1. Let's find the other slope.
[tex]\begin{gathered} m\cdot(-1)=-1 \\ m=1 \end{gathered}[/tex]This means the new perpendicular line has a slope of 1.
Now, we use the slope we found, the point P, and the point-slope formula, to find the equation.
[tex]\begin{gathered} y-y_1=m(x-x_1) \\ y-7=1(x-(-5)) \\ y-7=x+5 \\ y=x+5+7 \\ y=x+12 \end{gathered}[/tex]