Why Joao Pessoa? Relatives? Just thought it sounded interesting? What do you want to know? There are lots and lots of beach cities you could choose from. It might help if you gave some indication as to your interests, budget, etc. We don't know you. You mention only Manaus and Joao Pessoa as destinations, and you could use up 2 weeks visiting those, but I assume you're also visiting other points.
Given the fact that Brazil is the size of the continental U.S., and air fares casn be high, a quick trip takes a lot of careful planning. I assume you've done enough reserch to know that the Amazon is the place to see rainforest scenery and, of course, the Amazon itself, but not the best place to see wildlife (the Pantanal is best for that). I have the impression that if you want a quick day or overnight trip out of Manaus you could wait until you arrive, but if you want something more, especially if you want something somewhat more than a budget trip (e.g., accommodations on a boat that consist of more than hammocks on deck; and even those with "cabins" can vary widely in comfort), it's best to book ahead. That's especially true with a limited amount of time since you don't know what boats leave when you arrive. Plus, you probably want to time your trip so you can buy your airline tickets in advance. Manaus is a lonnnng ways from Rio, Sao Paulo, Iguaçu, etc. and even Joao Pessoa.