Answer
$H$: $14$ goats, $9$ chickens
Work Step by Step
Let $g$ represent the number of goats and $c$ represent the number of chickens.
Since there are a total of $23$ animals, we write the sum of of goats and chickens as:
$$g + c = 23$$
Next, we know that each goat has $4$ legs and each chicken has $2$ legs. If there are a total of 74 legs, we can write the second equation as:
$$4g + 2c = 74$$
In the first equation, isolate the variable $c$ by subtracting $g$ from both sides:
\begin{align*}g+c &= 23\\
g+c-\color{red}g &= 23-\color{red}g\\
c &=23-g
\end{align*}
Substitute your new equation, $c=23-g$, into the second equation, $4g+2c=74$:
\begin{align*}4g+2\color{red}c &= 74\\
4g+2\color{red}{(23-g)} &= 74\\
\end{align*}
Solve for $g$:
\begin{align*} 4g+2(23-g) &= 74\\
4g+46-2g &= 74\\
2g+46 &= 74\\
2g+46\color{red}{-46} &= 74\color{red}{-46}\\
2g &=28\\
\frac{2g}{2} &= \frac{28}{2}\\
g &= 14
\end{align*}
Now that we know $g=14$, we can use it to solve for $c$ from our first equation:
\begin{align*} g + c &= 23\\
\color{red}14 + c &= 23\\
14+c\color{red}{-14} &=23\color{red}{-14}\\
c &=9
\end{align*}