Translating this directly into an equation, I get

where is a proportionality constant thatyouhave to determine from the data you've been given. That is, they've given you M, w, h, and L in one case, and you have to figure out for that case.

Once you know , you can use it to solve for any of the unknown situations.