Subtract $1$ from $ \dfrac{x^2+2x+1}{x^2} $ to get $ \dfrac{ \color{purple}{ 2x+1 } }{ x^2 }$.
Step 1: Write $ 1 $ as a fraction by putting $ \color{red}{ 1 } $ in the denominator.
Step 2: To subtract raitonal expressions, both fractions must have the same denominator.
We can create a common denominator by multiplying the second fraction by $\color{blue}{x^2}$.
$$ \begin{aligned} \frac{x^2+2x+1}{x^2} -1 & \xlongequal{\text{Step 1}} \frac{x^2+2x+1}{x^2} - \frac{1}{\color{red}{1}} = \frac{ x^2+2x+1 }{ x^2 } - \frac{ 1 \cdot \color{blue}{ x^2 }}{ 1 \cdot \color{blue}{ x^2 }} = \\[1ex] & \xlongequal{\text{Step 2}} \frac{ \color{purple}{ x^2+2x+1 } }{ x^2 } - \frac{ \color{purple}{ x^2 } }{ x^2 }=\frac{ \color{purple}{ 2x+1 } }{ x^2 } \end{aligned} $$