Rossi drove the 2017 Mercedes W08, while Hamilton used the 2019 Yamaha MotoGP YZR-M1 that the MotoGP rider had used in the season finale at Valencia in November.
Images released by Monster Energy – the title sponsor of Yamaha – show both Rossi and Hamilton riding a MotoGP bike on track at the same time.
It is known that Hamilton undertook running at Valencia on Sunday, as Franco Morbdielli advised him of the bike and circuit lines. Hamilton had met Morbidelli earlier this season when the Mercedes driver attended the MotoGP season opener at Qatar as a guest of the Petronas-backed, Yamaha-running SRT team.
Hamilton has further experience of riding racing bikes, having spent a day at Jerez on a Yamaha R1 M Superbike last year with help from factory World Superbike riders Michael van der Mark and Alex Lowes, impressing the Crescent-run WSBK team.
“It’s so awesome to see a legend like Valentino in the car,” said Hamilton. "I’m excited for him, for discovering the car for the first time. [It] reminds me of my first time in an F1 car. When you see all the team around you, it’s just a different animal.”
Gallery: Hamilton Rossi swap
Reflecting on his time riding the Yamaha YZR-M1 with Rossi, Hamilton added: “It was so cool to be out on track and see Valentino ahead of me on the same bike.”
Rossi has previously racked up F1 experience and has tested for Ferrari on several occasions, beginning in 2002 when he created speculation that he would make a switch to four wheels after impressing Michael Schumacher.
His last F1 test came in 2010, although he has raced on four wheels several times since.
“I was a big fan of Lewis’ before but now I am even more," said Rossi. "We had a fantastic day, where the two top classes of motorsports not only met, but worked together.
"I felt like a real F1 driver for a day. I didn’t want the day to end. I also rode the YZR-M1 on track with Lewis. It was a proud moment for the team to share our passion with him.
"Technically, Valencia is a hard track and today was windy so, at one point, I thought it would be difficult for Lewis to continue, but he was brilliant on the bike and his position on the M1 was great. I think he had loads of fun, which is the main thing.”
The Valencia running meant Rossi was the first MotoGP rider to drive an F1 car since works Honda riders Marc Marquez and Dani Pedrosa drove a Toro Rosso in 2018.