Consider the second equation. Add $4x$ to both sides.
$$y+4x=0$$
To solve a pair of equations using substitution, first solve one of the equations for one of the variables. Then substitute the result for that variable in the other equation.
$$8x+5y=24,4x+y=0$$
Choose one of the equations and solve it for $x$ by isolating $x$ on the left hand side of the equal sign.
$$8x+5y=24$$
Subtract $5y$ from both sides of the equation.
$$8x=-5y+24$$
Divide both sides by $8$.
$$x=\frac{1}{8}\left(-5y+24\right)$$
Multiply $\frac{1}{8}$ times $-5y+24$.
$$x=-\frac{5}{8}y+3$$
Substitute $-\frac{5y}{8}+3$ for $x$ in the other equation, $4x+y=0$.
$$4\left(-\frac{5}{8}y+3\right)+y=0$$
Multiply $4$ times $-\frac{5y}{8}+3$.
$$-\frac{5}{2}y+12+y=0$$
Add $-\frac{5y}{2}$ to $y$.
$$-\frac{3}{2}y+12=0$$
Subtract $12$ from both sides of the equation.
$$-\frac{3}{2}y=-12$$
Divide both sides of the equation by $-\frac{3}{2}$, which is the same as multiplying both sides by the reciprocal of the fraction.
$$y=8$$
Substitute $8$ for $y$ in $x=-\frac{5}{8}y+3$. Because the resulting equation contains only one variable, you can solve for $x$ directly.
$$x=-\frac{5}{8}\times 8+3$$
Multiply $-\frac{5}{8}$ times $8$.
$$x=-5+3$$
Add $3$ to $-5$.
$$x=-2$$
The system is now solved.
$$x=-2,y=8$$
Steps Using Matrices
Consider the second equation. Add $4x$ to both sides.
$$y+4x=0$$
Put the equations in standard form and then use matrices to solve the system of equations.
For the $2\times 2$ matrix $\left(\begin{matrix}a&b\\c&d\end{matrix}\right)$, the inverse matrix is $\left(\begin{matrix}\frac{d}{ad-bc}&\frac{-b}{ad-bc}\\\frac{-c}{ad-bc}&\frac{a}{ad-bc}\end{matrix}\right)$, so the matrix equation can be rewritten as a matrix multiplication problem.
Consider the second equation. Add $4x$ to both sides.
$$y+4x=0$$
In order to solve by elimination, coefficients of one of the variables must be the same in both equations so that the variable will cancel out when one equation is subtracted from the other.
$$8x+5y=24,4x+y=0$$
To make $8x$ and $4x$ equal, multiply all terms on each side of the first equation by $4$ and all terms on each side of the second by $8$.