As Hank said (and we did this)see if you can pair up with another couple or 2 and you may get a taxi to take you to the train station without a big fuss. Its too far to walk but not far enough to get the taxi's attention.
We did what you are planning.. went to the train, the museum to see David, did some other sight seeing in Florence and then stopped to see the tower in Pisa and then back to the ship.
We didn't make reservations at the museum. We waited in line but it was not too bad. Follow Hank's advice and get off the ship as early as possible and you should be able to do this. On the way back you can take a bus (Route 1R I think is the correct one) and it will drop you at the place the port shuttle drops off the passengers from the ship and then you can take the port shuttle back to the ship. You might get lucky and get a taxi to the ship from the train station but I would not count on that.
Carnival Cruise Lines:
Fantasy 90, Celebration 95, Victory 05, Conquest 05, Spirit 6/06, Freedom 6/08, Holiday 7/08, Victory 6/09, Valor 9/09, Dream 6/10, Splendor 8/10,Conquest 8/11,Magic 11/11,Triumph 4/12,Spirit 7/12,Freedom 11/12, Triumph 2/13 - The fire cruise
NCL Dream October 2006, RCCL Mariner OTS June 2007, Celebrity Silhouette 2013