First, rewrite
[tex]\dfrac{x^2+5x+4}{x^2-3x+7} = \dfrac{(x^2-3x+7)+(8x-3)}{x^2-3x+7} = 1 + \dfrac{8x-3}{x^2-3x+7}[/tex]
Next, we have
[tex]\dfrac{x^2-3x+7}{8x-3} = \dfrac x8 - \dfrac{21}{64} + \dfrac{385}{512x-192}[/tex]
so we can further rewrite
[tex]\dfrac{x^2+5x+4}{x^2-3x+7} = 1 + \dfrac1{\frac x8 - \frac{21}{64} + \frac{385}{512x-192}}[/tex]
The idea behind all this is to get the limand into a form resembling the limit definition of the constant e, which is
[tex]\displaystyle e = \lim_{x\to\infty} \left(1+\frac1x\right)^x[/tex]
The next step is to make the substitution,
[tex]y = \dfrac x8 - \dfrac{21}{64} + \dfrac{385}{512x-192}[/tex]
Solving for x gives two solutions,
[tex]x = \dfrac{8y+3\pm\sqrt{64y^2+36y-19}}2[/tex]
but we want to have y approaching infinity, just like in the definition for e, which is achieved only by the solution with the positive square root. (You can check for yourself that the other solution instead approaches 3/4.)
So, our limit is equivalent to
[tex]\displaystyle \lim_{y\to\infty} \left(1+\frac1y\right)^{\frac{8y+3+\sqrt{64y^2+36y-19}}2}[/tex]
[tex]\displaystyle \lim_{y\to\infty} \left(1+\frac1y\right)^{\frac{8y+3+8y\sqrt{1+\frac{36}{64y}-\frac{19}{64y^2}}}2}[/tex]
[tex]\displaystyle \lim_{y\to\infty} \left(1+\frac1y\right)^{4y\left(1+\sqrt{1+\frac{36}{64y}-\frac{19}{64y^2}}\right)+\frac32}[/tex]
[tex]\displaystyle \lim_{y\to\infty} \left(\left(1+\frac1y\right)^y\right)^{4\left(1+\sqrt{1+\frac{36}{64y}-\frac{19}{64y^2}}\right)+\frac32}[/tex]
[tex]\displaystyle \lim_{y\to\infty} \left(\left(1+\frac1y\right)^y\right)^{4\left(1+\sqrt{1+\frac{36}{64y}-\frac{19}{64y^2}}\right)} \cdot \lim_{y\to\infty} \left(1+\frac1y\right)^{\frac32}[/tex]
Next, we use the fact that
[tex]\displaystyle \lim_{x\to\infty} f(x)^{g(x)} = \left( \lim_{x\to\infty}f(x)\right)^{\lim\limits_{x\to\infty}g(x)}[/tex]
Now, the "base" limit is e, while the "exponent" limit is
[tex]\displaystyle \lim_{y\to\infty} 4\left(1+\sqrt{1+\frac{36}{64y}-\frac{19}{64y^2}}\right) = 4(1+\sqrt{1+0+0}) = 8[/tex]
and the remaining limit is simply
[tex]\displaystyle \lim_{y\to\infty} \left(1+\frac1y\right)^{\frac32} = (1+0)^{\frac32} = 1[/tex]
So, we end up with
[tex]\displaystyle \lim_{x\to\infty} \left(\frac{x^2+5x+4}{x^2-3x+7}\right)^x = e^8 \cdot 1 = \boxed{e^8}[/tex]