We can spend 5 nights in either Porto or Lisbon and 4 nights in the other. What would you recommend?
What are you interested in? It's a toss up. Both Lisbon and Porto can be used as bases to visit nearby areas. Both cities are on rivers and you can get to Atlantic ocean. We are doing 4 nights Lisbon ( day trip to Sintra and coast; planning to do a few museums), 2 nights Porto, 1 night Pinhao( 2 hour Douro cruise). Good luck!
We were in both cities last fall and they a very different cities each wonderful in their own way,. If your choices are limited to the days you note, I would spend 5 in Lisbon and 4 in Porto. When in Porto, a visit to the spectacular Duro Valley would be a highlight and our favorite spot we visited. If your travel schedule is more flexible, you might want to consider 4 nights Lisbon, 2 nights in Coimbra and 3 nights in Porto as each city gives a very unique view life in Portugal.
Porto is much smaller than Lisbon, and in my opinion there is far more to do in Lisbon. If you think you have more day trip opportunities in one city vs. another, make your choice based on that. Personally, I would aim for 3 nights in Porto and nights in Lisbon (or maybe 1-2 nights somewhere else in between and 4 nights in Lisbon). In fact, with 9 nights in Portugal in 2018, that's exactly what I did.