To add or subtract expressions, expand them to make their denominators the same. Least common multiple of $x+2$ and $x-2$ is $\left(x-2\right)\left(x+2\right)$. Multiply $\frac{x}{x+2}$ times $\frac{x-2}{x-2}$. Multiply $\frac{x}{x-2}$ times $\frac{x+2}{x+2}$.
Since $\frac{x\left(x-2\right)}{\left(x-2\right)\left(x+2\right)}$ and $\frac{x\left(x+2\right)}{\left(x-2\right)\left(x+2\right)}$ have the same denominator, add them by adding their numerators.
Since $\frac{2x^{2}}{\left(x-2\right)\left(x+2\right)}$ and $\frac{4x}{\left(x-2\right)\left(x+2\right)}$ have the same denominator, subtract them by subtracting their numerators.