Answer
$$x=\frac{-5+\sqrt{109}}{2}$$
Work Step by Step
Using the rules of logarithms to solve the equation, we find:
$$\log _5\left(\left(x+4\right)\left(x+1\right)\right)=2 \\ \log _5\left(\left(x+4\right)\left(x+1\right)\right)=\log _5\left(25\right)\\ \left(x+4\right)\left(x+1\right)=25 \\ x=\frac{-5+\sqrt{109}}{2},\:x=\frac{-5-\sqrt{109}}{2}$$
Checking for extraneous solutions, we see that only $x=\frac{-5+\sqrt{109}}{2}$ is valid.