"Alleged" means to have said, without proof, that something has taken place. "Alleged" sounds close to "a ledge". A ledge is a horizontal surface project from a wall or cliff. Ledges are often seen on rock walls when rock climbing. Tom alleged that he is halfway up a mountain. The joke is centered around the word "alleged" and how it sounds like "a ledge" which is often seen when climbing a mountain.
' ' I ' m halfway up a mountain , ' ' Tom alleged .