Ok, I'm not the greatest cricket lover in the world but here goes.
First i thought that the batsman hit a six,( but during the few seconds that it took to get there) the batsmen ran and having crossed the other batsman would face the last ball, and he could hit a six to give them a 100 each but i guess that is too simple.
So , Fielders occasionally wear helmets when close fielding, when not is use they often place them on the ground behind the wicketkeeper.If the ball touches the helmet then 5 runs are awarded to the batting side.
So if the next to last ball batsman takes a single and the ball touches the helmet on the floor then he would be awarded another 5 runs to give him 100, then the last ball is hit for 6 by the other batsmen that gives both batsmen 100.
( probably not right but it's the best i can come up with.)