Safari in the morning, beach in the afternoon
You can do your safari in the Serengeti in the morning, then fly to Zanzibar and be on the beach in the afternoon. Zanzibar itself is most directly accessible, Pemba Island via Zanzibar and the islands in the south (Fanjove and Mafia) only via Dar-Es-Salam.