For a semisimple ring, if $M \oplus P \cong N \oplus P$, then $M \cong N$ (finitely generated $M$, $N$, $P$) 
Problem
Let $R$ be a semisimple ring (i.e. $R$ is semisimple as a left $R$-module). Show that if $M,N$ and $P$ are finitely generated $R$-modules such that $M \oplus P \cong N \oplus P$, then $M \cong N$.

I couldn't do much. If $R$ is semisimple, then I can use the following property:

A ring $R$ is semisimple (again, meaning that ${}_R R$ semisimple) if and only if every $R$-module is semisimple.

With this property, we have that $M$, $N$ and $P$ are semisimple so
\begin{alignat*}{2}
M &= M_1 \oplus \dotsb \oplus M_m
&\quad
&\text{with $M_j$ simple submodules of $M$,} \\
N &= N_1 \oplus \dotsb \oplus N_n
&\quad
&\text{with $N_j$ simple submodules of $N$, and} \\
P &= P_1 \oplus \dotsb \oplus P_r
&\quad
&\text{with $P_j$ simple submodules of $P$.}
\end{alignat*}
So we get
$$
M_1 \oplus \dotsb \oplus M_m \oplus P_1 \oplus \dotsb \oplus P_r
\cong
N_1 \oplus \dotsb \oplus N_n\oplus P_1 \oplus \dotsb \oplus P_r \,.
$$
I must use that all of these modules are finitely generated. I would really appreciate suggestions on how could I continue from here.
 A: You're doing fine so far! The next thing you have to do is to count how often a fixed isomorphism type of irreducible representations occurs on both sides. For this, use the following: If $M=M_1\oplus ...\oplus M_n$ a decomposition of a semi-simple, finitely-generated $R$-module $M$ as a sum of irreducible $R$-modules, and if $I$ is any irreducible $R$-module, then the number of summands $M_i$ that are isomorphic to $I$ is given by the dimension of $\text{Hom}_R(I,M)$ over the division ring $\text{Hom}_R(I,I)$. 
A: From where you stopped: apply the Krull-Schmidt theorem to pair up the modules on both sides. 
Without loss of generality you can arrange for the $P_i$'s to be paired up with their counterparts. As a result, the modules other than the P's will be paired up. This shows that the parts outside of $P$ are pairwise isomorphic, and so their direct sums are isomorphic.

I must use that all of these modules are finitely generated.

You already did. You needs this to write all three as finite direct sums of simple modules. They would be infinitely generated iff they had infinite length.
