Answer
Please see the work below.
Work Step by Step
We know that
(a) The escape speed is given as
$v=\sqrt{\frac{2GM}{r}}$
We plug in the known values to obtain:
$v=\sqrt{\frac{(2)(6.67\times 10^{-11})(0.107\times 10^{24})}{2.40\times 10^6}}$
$v=2400\frac{m}{s}$
(b) As we know that
$v=\sqrt{\frac{2GM}{r}}$
We plug in the known values to obtain:
$v=\sqrt{\frac{(2)(6.67\times 10^{-11})(1.99\times 10^{30})}{6\times 10^3}}$
$v=2.1\times 10^8\frac{m}{s}$