Find
\[\sum_{n = 1}^\infty \frac{n^2 + n - 1}{(n + 2)!}.\]
Let
\[S_m = \sum_{n = 1}^m \frac{n^2 + n - 1}{(n + 2)!}.\]We compute the first few sums $S_m$:
\[
\renewcommand{\arraystretch}{1.5}
\begin{array}{c|c}
m & S_m \\ \hline
1 & \frac{1}{6} \\
2 & \frac{3}{8} \\
3 & \frac{7}{15} \\
4 & \frac{71}{144} \\
5 & \frac{419}{840}
\end{array}
\]We note that the fractions seem to be approaching $\frac{1}{2},$ so we also compute $\frac{1}{2} - S_m$:
\[
\renewcommand{\arraystretch}{1.5}
\begin{array}{c|c|c}
m & S_m & \frac{1}{2} - S_m \\ \hline
1 & \frac{1}{6} & \frac{1}{3} \\
2 & \frac{3}{8} & \frac{1}{8} \\
3 & \frac{7}{15} & \frac{1}{30} \\
4 & \frac{71}{144} & \frac{1}{144} \\
5 & \frac{419}{840} & \frac{1}{840} 
\end{array}
\]We can relate the fractions $\frac{1}{2} - S_m$ to factorials in the following way:
\[\frac{1}{3} = \frac{2}{3!}, \ \frac{1}{8} = \frac{3}{4!}, \ \frac{1}{30} = \frac{4}{5!}, \ \frac{1}{144} = \frac{5}{6!}, \ \frac{1}{840} = \frac{6}{7!}.\]Thus, we conjecture that
\[S_m = \frac{1}{2} - \frac{m + 1}{(m + 2)!}.\]So, let
\[T_n = \frac{1}{2} - \frac{n + 1}{(n + 2)!}.\]Then
\begin{align*}
T_n - T_{n - 1} &= \left( \frac{1}{2} - \frac{n + 1}{(n + 2)!} \right) - \left( \frac{1}{2} - \frac{n}{(n + 1)!} \right) \\
&= \frac{n}{(n + 1)!} - \frac{n + 1}{(n + 2)!} \\
&= \frac{n(n + 2) - (n + 1)}{(n + 2)!} \\
&= \frac{n^2 + n - 1}{(n + 2)!},
\end{align*}which is exactly what we are summing.

From the identity
\[\frac{n}{(n + 1)!} - \frac{n + 1}{(n + 2)!} = \frac{n^2 + n - 1}{(n + 2)!},\]we have that
\begin{align*}
\sum_{n = 1}^\infty \frac{n^2 + n - 1}{(n + 2)!} &= \left( \frac{1}{2!} - \frac{2}{3!} \right) + \left( \frac{2}{3!} - \frac{3}{4!} \right) + \left( \frac{3}{4!} - \frac{4}{5!} \right) + \dotsb \\
&= \boxed{\frac{1}{2}}.
\end{align*}