A Mathematical Exploration of Why Language Models Help Solve Downstream Tasks