If you play The Hitchhiker’s Guide to the Galaxy (original BBC miniseries) backwards, you see Arthur and Ford on prehistoric Earth, they help the Cavemen (who don’t live in caves) get rid of the Golgafrinchams, sending them back to their own planet, taking Ford and Arthur with them
they then teleport into a Disaster Area stuntship in the middle of a sun-escape stunt, reuniting with Zaphod, Trillian and Marvin, they take the ship to Milliways, where Marvin spends 530,000,000 years stealing (well, un-parking) cars, Ford, Zaphod, Arthur and Trillian have a nice meal at milliways, regurgitating four rare steaks which reassemble themselves into the Dish of the Day
they then are sucked backward through time by an imploding hyperspatial field generator, onto Magrathea where they cower behind the generator while Galactic Police save their lives by sucking energy bolts out of it, then they go and watch a holovid showing how Deep Thought had a planet named Earth turned into a galactic computer in order to prove that the number 42 was The Answer
they then climb out of the catacombs of Magrathea, get back into the Starship Heart of Gold, where they encounter a Sperm Whale and Bowl of Petunias miraculously appearing on the planet’s surface, reassembling themselves and flying off into space
Onboard the Heart of Gold, they escape from Magrathea, in the process, the Probability Drive changes the Sperm Whale and Petunias into a pair of nuclear missiles that then rapidly retreat from the HOG and land back in their launch tubes
Ford and Arthur are then, without warning, ejected back out into space by the Probability drive, thankfully, they’re picked up by a freindly Vogon Destructor Fleet (which, contrary to it’s name, actually creates planets), Ford and Arthur compliment the captain on the wonderful poem he is about to create, and just to be extra nice, the Vogons rebuild the planet Earth and allow Ford and Arthur to hitchhike back to it (most helpful, these Reverse-Vogons)
Ford and Arthur end up back in the pub, where they each regurgitate three pints of beer, and vomit up some peanuts, Arthur hears Prosser and the bulldozer crew rebuilding his house, so Ford escorts Arthur back to the bulldozer crew led by Mr Prosser, where Arthur lies down in the mud and demands that they stay
after a few squelchy minutes in the mud, Arthur goes back into his house, regurgitates some asprin, then goes back upstairs and gets back into bed with a hangover from tomorrow’s party