Hi shero, this may be an easy way of looking at it.
in front of = close or near. example 'he is right in front of you (very close)'
ahead of = far or at a distance. example 'he ran on ahead (and is no longer in sight)' or 'he is just ahead of us (but at a distance)'
however 'ahead of' is not always far or distant it's typically used when someone or something is 'ahead of you' (out of your reach) and you want to catch up.
Like in Roy's example "the other contestant is 2 steps ahead" gives a feeling that the opponent is close yet just out of your reach.
I hope this helps, good luck ^.^v