Concept:
The external work required equals the increase in gravitational potential energy minus the work done by buoyancy while the cube remains inside water.
Step 1: Calculate volume and mass of the cube.
Side
\[
a=1\,cm=10^{-2}m.
\]
Volume
\[
V=a^3=10^{-6}m^3.
\]
Density
\[
\rho=1.5\,g\,cm^{-3}=1500\,kg\,m^{-3}.
\]
Mass
\[
m=\rho V
=1500\times10^{-6}
=1.5\times10^{-3}kg.
\]
Step 2: Compute actual weight.
\[
W_g=mg
=(1.5\times10^{-3})(10)
=1.5\times10^{-2}N.
\]
Step 3: Calculate buoyant force.
\[
F_b=\rho_w V g.
\]
Taking
\[
\rho_w=1000\,kg\,m^{-3},
\]
\[
F_b
=
1000\times10^{-6}\times10
=
10^{-2}N.
\]
Step 4: Work done inside water.
Cube rises from bottom to surface through
\[
5m.
\]
Effective force
\[
F=W_g-F_b
=
1.5\times10^{-2}-10^{-2}
=
5\times10^{-3}N.
\]
Work done
\[
W_1=F\times5
=
25\times10^{-3}J.
\]
\[
W_1=25\,mJ.
\]
Step 5: Work done above water.
Distance above water surface
\[
15m.
\]
Now only weight acts.
\[
W_2=mg(15)
=
1.5\times10^{-2}\times15.
\]
\[
W_2=225\,mJ.
\]
Step 6: Total work.
\[
W=W_1+W_2
=
25+225
=
250\,mJ.
\]
Thus
\[
\boxed{250\,mJ}
\]