iMac and MacBook Air shared monitor
Simple answer, no it's not possible. The Target Display Mode is a function specific to the iMac and this functionality isn't incorporated into MacBooks.

You could of course pair the wireless keyboard and trackpad to your MacBook and use TDM on the iMac, but if you're trying to leverage the iMac's CPU power you're out of luck I'm afraid. You'd be better off buying a small cheap monitor if you need a secondary display for use with the iMac.