I supose that if $t$ is an eigenvalue of $B$ and hence there is an eigenvector $x$ associated such that
$Bx=tx$
$MBx=M(tx)$
$AMx=A(Mx)=t(Mx)$
How can I ensure that $Mx$ is different from $0$ so that $t$ is an eigenvalue of $A$?
I supose that if $t$ is an eigenvalue of $B$ and hence there is an eigenvector $x$ associated such that
$Bx=tx$
$MBx=M(tx)$
$AMx=A(Mx)=t(Mx)$
How can I ensure that $Mx$ is different from $0$ so that $t$ is an eigenvalue of $A$?
Let $p$ be the characteristic polynomial of $B$.
Because $AM=MB$, we have $p(A)M=Mp(B)$. It follows from Cayley's theorem that $p(A)M=0$. We see $p(A)$ is not invertible since $M\neq 0$. I think this is enough to draw the conclusion.
(IMPORTANT: this is currently only a partial answer that was too long to be a comment, the answer from Landau is much quicker, simpler, and actually proves the result in its entirety! However, I wanted to show something that followed the footsteps of what Renato and Prem tried, plus it at least covers more than just invertible $M$ which would be trivial due to being able to write $B = M^{-1}AM$.)
Eigenvectors alone might not get the job done, but I thought we could get the same kind of method to work, so we'll go a small step further:
Assume $M$ is not nilpotent, i.e. $\forall j \in \mathbb{N},\,\, M^j \neq 0$. (This is why the answer is only partial, but since it covers slightly more than just $M$ invertible I'll write it anyway).
Since we're in $\mathbb{C}$, the characteristic poynomial of $B$ $\chi_B$ can be written in the form: $$\chi_B(X) =: \prod_{k=0}^s \left(X - \lambda_k\right)^{m_k}$$
with $\sum_{k=0}^s m_k = n$ since $\deg(\chi_B) = n$.
Let $C_k := \operatorname{Ker}(B - \lambda_kI_n)^{m_k}$ be the set of generalized eigenvectors of $B$ for $\lambda_k$. It is a known result that:
$$\mathbb{C}^n = \bigoplus_{k=0}^{s} C_k$$
in contrast to the usual eigenspaces whose sum might not always cover all of $\mathbb{C}^n$.
By our assumption on $M$, there must exist $k$ and $x \in C_k$ such that $y := M^{m_k} x \neq 0$ by the above statement.
We then obtain:
$$\left(A - \lambda_k I_n \right)^{m_k}y = \left(AM - \lambda_k M\right)^{m_k}x = \left(MB - \lambda_k M\right)^{m_k}x = M^{m_k}\left(B - \lambda_k I_n\right)^{m_k}x = 0$$
Therefore, $y$ is a generalized eigenvector of $A$ for $\lambda_k$, and as such $\lambda_k$ is an eigenvalue of $A$ (and for at most the same multiplicity as for $B$), which concludes the proof for $M$ non-nilpotent (well, technically the proof only needs $M$ with a nilpotence index of over $\max_k{m_k} + 1$ but that's still not every $M$...).