Is this it legal? I mean does Nintedo allow this?

yes, im pretty sure they covered that in the main page or the faq.

nintendo dont give a damn because p2d is not a crappy rip off, its an awsome fangame. ive seen to many cheep metroid fangames, p2d isnt one of them.