It is at least a 4.5 hour drive from Tampa port to Port Miami. Plus time to pick up a rental car. Depending on what route you take it's between 275 and 285 miles. If traffic is really bad it could take longer.
Royal does accept the emed proctored test for boarding no matter where you board from. I used emed before the Odyssey TA and again from my hotel the day we disembarked for a flight back to the US the next day.