Subtract $ \dfrac{5}{x+2} $ from $ 7x $ to get $ \dfrac{ \color{purple}{ 7x^2+14x-5 } }{ x+2 }$.
Step 1: Write $ 7x $ 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 first fraction by $\color{blue}{ x+2 }$.
$$ \begin{aligned} 7x- \frac{5}{x+2} & \xlongequal{\text{Step 1}} \frac{7x}{\color{red}{1}} - \frac{5}{x+2} = \frac{ 7x \cdot \color{blue}{ \left( x+2 \right) }}{ 1 \cdot \color{blue}{ \left( x+2 \right) }} - \frac{ 5 }{ x+2 } = \\[1ex] & \xlongequal{\text{Step 2}} \frac{ \color{purple}{ 7x^2+14x } }{ x+2 } - \frac{ \color{purple}{ 5 } }{ x+2 }=\frac{ \color{purple}{ 7x^2+14x-5 } }{ x+2 } \end{aligned} $$