I visited Poland on a whim in 2015 and fell hard for it; beautiful country, lovely people and wonderful food. With 5 days I'd suggest 2 in Krakow and 3 in Warsaw, with one of the days being a long day trip by train to Gdansk. As others say, don't miss Gdansk. The architecture is quite unique and its setting against the Baltic is stunning. I took the 6:30 am train from Warsaw and arrived by 9:30 and walked easily to the old town--lots to explore there, then took a boat ride out to see the Westerplatte, had a nice lunch, more exploring of the town and then walked to the Solidarity museum, another don't miss. It was a 10 minute walk from the train station and I caught the 5:30 back to Warsaw.
Warsaw had the Museum of the History of Polish Jews and also an ethnographic museum and a particularly interesting National Gallery--I love the Art Nouveau/Secession era art and in Poland it was called Mloda Polska, wonderful works from artists I'd never heard of. There's the Royal Castle and the old town itself is fun to explore.
Krakow was my favorite, though--I spent 4 days there and never tired of wandering the little lanes of the old town, and the main square had a continual food, crafts and music fair going on, plus Cloth Hall is right there and there's a good art gallery on the top floor, also the Kazimierz district, a great ethnographic museum (I love ethnographic museums and folk art!) and of course I also made a 3/4 guided day trip to Auschwitz.