Question dealing with modules and socles.

To help myself prepare for an upcoming exam, I've been working on various problems that focus on the topics we have been dealing with in class. I came across this one:

Let $M$ be a right $R$-module such that $M / Soc(M)$ is finitely generated. Show that $M = A \oplus B$, where $A_R$ is finitely generated, and $B_R$ is semisimple.

Any help would be greatly appreciated. Thanks!

-

For the canonical surjection $f \colon M \to M/Soc(M)$, choose a preimage for each of the finitely many generators of $M/Soc(M)$. These generate a finitely generated submodule $A \subseteq M$. Notice that $M/Soc(M) = f(A) = (A + Soc(M))/Soc(M)$, which implies that $A + Soc(M) = M$.
Now $A \cap Soc(M)$ is a submodule of the semisimple module $Soc(M)$, so there is a submodule $B$ of $Soc(M)$ such that $Soc(M) = (A \cap Soc(M)) \oplus B$. I'll leave it to you to finish the proof by showing that $A + B = M$ and $A \cap B = 0$. (Or, if you're stumped, leave a comment and I'll complete this answer.)