You have the order in which the equations are derived backwards. The equations of motion derived from the Lagrangian for massive (Proca) electrodynamics is the last one in the question,
$$\partial^{\mu}F_{\mu\nu}+m^{2}A_{\nu}\equiv\partial^{\mu}(\partial_{\mu}A_{\nu}-\partial_{\nu}A_{\mu})+m^{2}A_{\nu}=0,$$
and the other two equations may be derived from it. (If, however, you really want to reverse the order of the derivation, the final step below can just be inverted.)
To get the Lorenz condition $\partial^{\nu}A_{\nu}=0$, you take the four divergence $\partial^{\nu}$ of the above equation, which gives
$$\partial^{\nu}\partial^{\mu}(\partial_{\mu}A_{\nu}-\partial_{\nu}A_{\mu})+m^{2}\partial^{\nu}A_{\nu}=0.$$
The left-hand term is identically zero, since upon reordering the derivatives, it becomes
$\partial^{\mu}\partial_{\mu}\partial^{\nu}A_{\nu}=\partial^{\mu}\partial_{\mu}\partial^{\nu}A_{\nu}$. This leaves just $m^{2}\partial^{\nu}A_{\nu}=0$, which is the Lorenz condition times the constant $m^{2}>0$. (Note that in conventional Maxwell electrodynamics, where $m^{2}=0$, we would not be able to conclude that $m^{2}\partial^{\nu}A_{\nu}=0$ implied $\partial^{\nu}A_{\nu}=0$. Instead, we would have the freedom to choose the gauge to make $\partial^{\nu}A_{\nu}$ anything; however, the gauge symmetry is lost in the massive theory, and the Lorenz condition $\partial^{\nu}A_{\nu}=0$ is no longer a choice, but a requirement.)
Once the Lorenz condition has been established, note that the equation of motion may be written
$$\left(\partial^{\mu}\partial_{\mu}\right)A_{\nu}-\partial_{\nu}\left(\partial^{\mu}A_{\mu}\right)+m^{2}A_{\nu}=0.$$
By virtual of the Lorenz condition, the middle term vanishes, and the remaining terms are
$$(\partial^{2}+m^{2})A_{\nu}=0.$$