A body gets stuck to the surface of a star if the inward gravitational force is greater than the outward centrifugal force caused by the rotation of the star.
Gravitational force,fg=−GMm/R2
where
Mass of the star,M=2.5×2×1030=5×1030 kg
Mass of the body:m
Radius of the star:R=12 km=1.2×104 m
fg=6.67×10−11×5×1030(1.2×104)2m
=2.31×1012m N
Centrifugal force,fc=mRω2
=m×4π2f2R
=m×4×3.142×1.22×1.2×104
=6.82×105m N
Since fg>fc, the body will remain stuck to the surface of the star.