The Magic School Bus Lost in the Solar System is the fourth book in the original book series.
When the closed planetarium disappoints her students on a class trip, Ms. Frizzle saves the day. She manages to launch the bus into space and steers it around the solar system, visiting the moon, the sun, Mercury, Venus, and Mars before an asteroid knocks out one of the taillights.
When Ms. Frizzle leaves the bus to investigate, her tether breaks, she gets lost in space, and the students visit the outer planets without her.
They reconnect with her eventually and end up back in the classroom, making a chart and mobile based on their discoveries.