Spending 5 days in Krakow is not too much, especially if you do side trips to Auschwitz, the salt mines and Zakopane. However, I would consider 7 days to be too long as Krakow is not a huge city and its city center is very compact. In this case, you could add 2 or 3 days in Wroclaw and Warsaw.