The work done on a body by the net force ##\vec F_{net}## acting on it, or the change in its kinetic energy, is given by:$$\int_\vec{s_1}^\vec{s_2}\vec F_{net}\cdot d\vec s$$
Where ##\vec s## is the displacement vector.
In your problem, the net force on the body is composed of only the gravitational pull the body feels because of the planet, and the displacement is straight upwards.
PeroK has given you the expression of the force. The integral simplifies to:
$$\int_{R_\text{mars}}^h-\frac{Gm_1m_2}{r^2}dr$$
This geometrically represents the area under the curve of the force against height in the graph you have from ##r=## the radius of mars, to ##r=h##.
It is unlikely that the problem wants you to find an approximation since the height is too big + he gave you a graph of the force, but here's how you can do it:
$$m_1a=\frac{Gm_1m_\text{mars}}{R_{mars}^2}\Leftrightarrow a=\frac{Gm_\text{mars}}{R_{mars}^2}$$
For heights close to the surface of mars, you can assume that the acceleration due the gravity of the planet is ##g_\text{mars}=a##, so the force your body feels is ##mg_\text{mars}##. Hence ##\Delta K=m_1g_\text{mars}h##.