What's the relation between molarity and molality? I am trying to derive the relation between the molarity and molality of a solution

Mole concept $\displaystyle n = \frac{M'}{M''}$


Here, ($n$) stands for number of moles
$\ce{(M^{'})}$ stands for mass of substance in gram
$\ce{(M^{''})}$ stands for molecular/atomic mass of substance


Let $V_{\text{sol}}= $ volume of solution
Molarity (M) $= n/V_{\text{sol}}$


The above equation of molarity ($M$) shows the concentration of solution of substance, i.e. ($M$) is the ratio of number of moles ($n$) with respect to it's volume ($V_{\text{sol}}$)


let $W$ = mass of solvent in kilogram
molality $(m) = n/W$


The above equation of molality ($m$) shows the concentration of solution of substance
i.e. ($m$) is the ratio of number of moles ($n$) with respect to mass of it's solvent ($W$)

What is the relation between molarity ($M$) and molality ($m$)?

Molarity ($M$) = $n$/$V_{\text{sol}}$
Molality ($m$) = $n$/$W$

I'm confused on how to relate the $W$ with $V_{\text{sol}}$.
$W$ and $V_{\text{sol}}$ can be related via the density of solution. We have, mass of solution = mass of solute + mass of solvent.
Hence, 
$$ M_{\text{sol}} = W + M’ $$

Let us assume the density of the solution to be $\rho$. Since, density is equal to mass over volume, we have,
 $$ \rho=  \frac{M_{\text{sol}}}{V_{\text{sol}}} = \frac{W + M’}{V_{\text{sol}}} $$
Thus, you have relation between $W$ and $V_{\text{sol}}$.