Answered by ZUPAN | Nov. 28, 2019 09:37
Your entire itinerary is perfectly eligible for visa free transit scheme and you don't need any kind of visa.
1) During your first stop in Shanghai, you will be eligible for 144 hour visa free transit because your transit time will be, almost certainly, be longer than 24 hours. During your second stop, you will be probably eligible for 24 hour visa free transit because I assume that you will need less than 24 hours for a transfer from a cruise terminal to your flight back to Canada. The most important detail is that regardless of 24 or 144 hour visa free transit, you will travel both ways and during both Shanghai stops, absolutely visa free.
2) You really don't need to make any combinations. You are perfectly eligible for a visa free travel and you really don't need to think about these formalities. You are advised to print out your flight and cruise tickets and to bring those printouts with you. Also, you are advised to bring a printout of your accommodation booking confirmation for your overnight in Shanghai.
You will just declare at check-in in Toronto that you will travel to Japan via Shanghai using 144 hour visa free transit. After a short inspection of your tickets, you will be allowed to board the plane. Upon your arrival in Shanghai, you will approach 144 hour visa free transit counter where you will fill out the blue form and shortly after you will get a sticker in your passport and be allowed to exit the airport.