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