This page explains in detail the interactions between the Famicom Grand Prix series and the Mario series.
Famicom Grand Prix: F-1 Race

October 30, 1987
The pilot is shown on the game's cover to be Mario. In the game itself he's only shown before the start of the race, and after winning it. An oddity is that also the other pilots look like Mario.
Super Mario Bros. Game & Watch special edition
1987
A special edition of the Super Mario Bros. Game & Watch, in a case shaped like the Famicom Disk System mascot Diskun, was given out as prize for a Famicom Grand Prix: F-1 Race tournament.
Famicom Grand Prix II: 3D Hot Rally
April 14, 1988
The pilot is once again shown on the cover to be Mario, but this time there also is Luigi as the navigator. Also they can be seen getting out of the car at the end of the race, but they aren't very recognizable.
Super Mario Bros. & Friends: When I Grow Up

The Race Car Driver/Mechanic image colored.
March 24, 1992
This educational/coloring book game features various colorable images themed after common careers. One of these is the Racecar Driver/Mechanic image and it features Mario and Luigi driving the Monster truck down a dirt road. The image is actually taken directly from the 3D Hot Rally cover.
Mario Kart Wii

April 10, 2008
One of the small karts in the game is shaped like the "Monster" from Famicom Grand Prix II: 3D Hot Rally, and its colors also match the original ones when it's driven by Baby Mario. In the Japanese version of the game this kart is even called "Hot Rally", but the name was changed to "Tiny Titan" in North America, and "Rally Romper" in Europe.
Mario Kart 8

The Mario Motors sign.
May 29, 2014
An artwork from Famicom Grand Prix II: 3D Hot Rally appears in Mario Kart 8 on a billboard for "Mario Motors".
License
Copyrights for both series are held by Nintendo.