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