Answer
The graphs are not the same.
Work Step by Step
Given
\begin{equation}
\begin{aligned}
& (\sqrt{x}-1)(\sqrt{x}-1)=x+1 \\
& {[0,5,1] \text { by }[-1,2,1]}
\end{aligned}
\end{equation}
Let
\begin{equation}
\begin{aligned}
f(x)&= (\sqrt{x}-1)(\sqrt{x}-1) \\
g(x)&=x+1 \\
\end{aligned}
\end{equation}
The graphs of both functions are shown in the figure and are clearly not the same. They will be the same if we choose:
\begin{equation}
\begin{aligned}
g(x)&= (\sqrt{x}-1)^2\\
&=x-2\sqrt{x}+1 \\
\end{aligned}
\end{equation}