Two batsman each on 94 runs. Seven runs needed to win in last 3 balls. Both make 100*. How?

Batsman hit six and gone retired hurt while the new batsman come to play and get runout for his wicket and the other batsman hit six and made both century and team win..