Factorize both quadratic polynomials, as shown below
![\begin{gathered} a^2-3a-4=0 \\ \Rightarrow a=(3\pm√(9+16))/(2)=(3\pm√(25))/(2)=(3\pm5)/(2)\Rightarrow a=-1,4 \\ \Rightarrow a^2-3a-4=(a+1)(a-4) \\ \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/ey2eos8g8ak2g4xloovkmrq8d7c0zafuax.png)
Similarly,
![\begin{gathered} a^2+5a+4=0 \\ \Rightarrow a=(-5\pm√(25-16))/(2)=(-5\pm3)/(2)\Rightarrow a=-1,-4 \\ \Rightarrow a^2+5a+4=(a+1)(a+4) \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/2h3zbv0hgwyosyieinyupdacnenz50h6z1.png)
Thus,
![\Rightarrow(a^2-3a-4)/(a^2+5a+4)=((a+1)(a-4))/((a+1)(a+4))](https://img.qammunity.org/2023/formulas/mathematics/college/p8pcanbbwatw4cl07zs80rwgsl7y2u8xiy.png)
Therefore, since the denominator cannot be equal to zero.
The variable restrictions for the original expression are a≠-1,-4
Then, provided that a is different than -1,
![\Rightarrow(a^2-3a-4)/(a^2+5a+4)=(x-4)/(x+4)](https://img.qammunity.org/2023/formulas/mathematics/college/bgi1c5ukmnp1xkac8uimiat9ch2bi38k8i.png)
The rational expression in the lowest terms is (x-4)/(x+4)