I need help with this mathematics work it’s about writing linear equations

Given:
Slope = -1.
Point = (5,-2)
General equation line is:
[tex]y=mx+c[/tex]Where,
[tex]\begin{gathered} m=Slope \\ c=y-\text{intercept} \end{gathered}[/tex]So equation of line:
[tex]\begin{gathered} y=mx+c \\ y=(-1)x+c \\ y=-x+c \end{gathered}[/tex]Piont (5,-2)
[tex]\begin{gathered} x=5 \\ y=-2 \end{gathered}[/tex][tex]\begin{gathered} y=-x+c \\ x=5 \\ y=-2 \\ y=-x+c \\ -2=-5+c \\ c=5-2 \\ c=3 \end{gathered}[/tex][tex]\begin{gathered} y=mx+c \\ y=-x+3 \end{gathered}[/tex]So equation of line is:
[tex]y=-x+3[/tex]