My friend doesn't have Mario Kart 7 and I don't know if we can game share so that I can give it to him. I have put my memory card in his console but then the game disappears from mine.
If you have Mario Kart 7 as a cartridge, you can simply lend it. However, if you purchased Mario Kart 7 from the eShop or if it was pre-installed on your 3DS console, it is tied to that specific system (and/or SD card) and cannot be shared with someone else.
It is however possible to do a System Transfer if you want to permanently transfer your entire 3DS' contents to another device.