From the equations W = mg and `s = 1/(2*g*t^2)` an expression for W has to be created that does not contain g.
`s = 1/(2*g*t^2)`
=> `2g*t^2 = 1/s`
=> `g = 1/(s*2*t^2)`
Substitute this for g in W = mg
=> `W = m/(s*2*t^2)`
The required expression is `W = m/(2*s*t^2)`
The answer to this should have actually been 2ms/t^2