Answer:
The cannonball and the ball will both take the same amount of time before they hit the ground.
Explanation:
For a ball fired horizontally from a given height, there is only a vertical acceleration on it towards the ground. This acceleration is equal to the acceleration due to gravity (g = 9.81 m/s^2). A ball dropped from a height will also only experience the same vertical acceleration downwards which is also equal to g = 9.81 m/s^2.
Therefore both the cannonball and the ball will take the same amount of time to hit the ground if they are released/fired from the same height.