Simplest possible solution: he wasn't really dead when they took him down for the cross. 9 hours generally wasn't enough to die. The part about the tomb is either artistic license, or maybe they really put him in there to keep up appearances and got him out soon after.
J Warner Wallace addresses this topic in his book
Cold Case Christianity. It's important to recognize that Jesus's treatment prior to crucifixion was far worse than the average prisoner. John 19:34 documents his being stabbed on the side and water coming out. This was evidently questioned by early critics of the Gospel accounts, which is why apologists in the early church were unsure about the meaning of this verse, which would only be the case if other crucifixion victims did not have a similar treatment before being hung up on a cross, so it makes sense Jesus would die earlier than others. Now with modern science and our knowledge of pleural effusion, it provides further testimony to the reliability of the Gospel accounts.