This is a nice little brain teaser. I can't dedicate time to properly formatting my solutions right now, so I will have to do that later.
Oh, and I missed that there are 5 problems and not 4, so I will need to deal with that one, as well, but it should be easy enough, if my surface skimming of the text is not betraying me.