Let $a$ and $b$ be the roots of $x^2 - 4x + 5 = 0.$  Compute
\[a^3 + a^4 b^2 + a^2 b^4 + b^3.\]
by Vieta's formulas, $a + b = 4$ and $ab = 5.$  Then
\begin{align*}
a^3 + b^3 &= (a + b)(a^2 - ab + b^2) \\
&= (a + b)(a^2 + 2ab + b^2 - 3ab) \\
&= (a + b)((a + b)^2 - 3ab) \\
&= 4 \cdot (4^2 - 3 \cdot 5) \\
&= 4,
\end{align*}and
\begin{align*}
a^4 b^2 + a^2 b^4 &= a^2 b^2 (a^2 + b^2) \\
&= (ab)^2 ((a + b)^2 - 2ab) \\
&= 5^2 (4^2 - 2 \cdot 5) \\
&= 150,
\end{align*}so $a^3 + a^4 b^2 + a^2 b^4 + b^3 = \boxed{154}.$