Given:
The rest of the solar system would disappear
To find:
What happens to the moon
Step-by-step explanation:
The moon rotates around the Earth in orbit, which means the moon's linear velocity is along the orbit's tangent.
When Earth disappears, the Moon continues its motion due to the inertia and flies off in a straight line.
Hence, when the rest of the solar system disappears, the Moon would fly off in a straight line.