#### Answer

$g(a+h)=a^2+2ah+h^2+2a+2h+1$

#### Work Step by Step

Replacing $x$ with $a+h$ in the given function, $
g(x)=x^2+2x+1
$, then $g(a+h)$ is equal to,
\begin{array}{l}
(a+h)^2+2(a+h)+1
\\\\=
(a^2+2ah+h^2)+(2a+2h)+1
\\\\=
a^2+2ah+h^2+2a+2h+1
\end{array}