Don't know Macbook login password
I don't believe a Mac can be locked to the point where you cannot even install a fresh OS. That would require a locking at firmware level, and I don't believe the MacBooks offer this option.

You should be able to restart, with the option (alt) key pressed, so that you get into the boot screen where you can choose to start up from the recovery system, and then re-install OS X from it, all without needing a password.

Oh, I see you also asked here: Resetting password for Macbook
There, you mention that you were able to get to the rescue screen with Cmd-R. So, why can't you re-install OS X then? It's offered as an option there, isn't it?