These two cannons will both travel to the same spot (if we consider nil air resistance). However, the one fired at 50 degrees goes higher into the air than the one fired at 40 degrees and so will hang in the air a bit longer than the other one and thus will have a longer time in flight.