\(\frac{\left(x+1\right)\left(x+2\right)\left(x+3\right)\left(x+4\right)+4}{x^2+5x+4}\)
\(=\frac{\left(x+1\right)\left(x+2\right)\left(x+3\right)\left(x+4\right)+4}{x^2+x+4x+4}\)
\(=\frac{\left(x+1\right)\left(x+2\right)\left(x+3\right)\left(x+4\right)+4}{x\left(x+1\right)+4\left(x+1\right)}\)
\(=\frac{\left(x+1\right)\left(x+2\right)\left(x+3\right)\left(x+4\right)+4}{\left(x+1\right)\left(x+4\right)}\)
\(=\left(x+2\right)\left(x+3\right)+4\)