Write the equation of the line passing through point (3, -1) and perpendicular to y = -x + 1

Two line are perpendicular to eachother if the product of their slopes is equal to -1.
That is;
[tex]m_1m_2=-1[/tex]From the equation of the first line;
[tex]\begin{gathered} y=-x+1 \\ \text{From y=mx+c;} \\ \text{Where m is the slope.} \\ \text{Then;} \\ m_1=-1 \end{gathered}[/tex]Then,
[tex]\begin{gathered} -m_2=-1 \\ m_2=1 \end{gathered}[/tex]Since the line passes through the point (3, -1).
[tex]\begin{gathered} y=m_2x+c \\ \text{Where y=-1, x=3;} \\ -1=1(3)+c \\ c=-1-3 \\ c=-4 \\ y=x-4 \end{gathered}[/tex]CORRECT OPTION: D