How to solve this and get the equation of a perpendicular line and and equation of a parallel line

(a) If two line are perpendicular than:
[tex]m_1\times m_2=-1[/tex]where:
[tex]\begin{gathered} m_1=\text{ first line slope} \\ m_2=\text{ second line slope} \end{gathered}[/tex]line :
[tex]\begin{gathered} y=mx+c \\ y=-5x+1 \end{gathered}[/tex]So perpendicular line slope is:
[tex]\begin{gathered} m_1m_2=-1 \\ -5\times m_2=-1 \\ m_2=\frac{1}{5} \end{gathered}[/tex]So equation of perpendicular line is:
[tex]\begin{gathered} y=mx+c \\ y=\frac{x}{5}+c \end{gathered}[/tex]Line pass is (-2,-5)
[tex]\begin{gathered} y=\frac{x}{5}+c \\ -5=-\frac{2}{5}+c \\ c=\frac{2}{5}-5 \\ c=-\frac{23}{5} \end{gathered}[/tex]Final equation of perpendicular line is:
[tex]\begin{gathered} y=mx+c \\ y=\frac{x}{5}-\frac{23}{5} \end{gathered}[/tex](b) parallel line slope is same for each other line is:
[tex]\begin{gathered} m_1=m_2 \\ m_1=-5 \\ m_2=-5 \end{gathered}[/tex]so parallel line equation is:
[tex]\begin{gathered} y=mx+c \\ y=-5x+c \end{gathered}[/tex]line pass at point (-2,-5) then.
[tex]\begin{gathered} y=-5x+c \\ -5=-5\times(-2)+c \\ -5=10+c \\ c=-10-5 \\ c=-15 \end{gathered}[/tex]So parallel line equation is:
[tex]\begin{gathered} y=mx+c \\ y=-5x+(-15) \\ y=-5x-15 \end{gathered}[/tex]