Caffeine can improve aspects of exercise performance, including endurance, according to the International Society of Sports Nutrition's position stand. Its evidence includes controlled studies using measured caffeine doses, not simply interchangeable cups of coffee. A result from that literature does not mean every person should begin drinking coffee before training.
The About Coffee source suggests roughly an hour before exercise. That is a common research timing, but response depends on the product, habitual use and the individual. Coffee's caffeine content varies, so a fixed instruction to drink two cups is imprecise. More caffeine is not automatically better, and an unfamiliar dose can disrupt an otherwise familiar workout.
If coffee is already part of your routine, assess comfort and sleep as well as perceived energy. Avoid combining it casually with other stimulant products, and obtain personal guidance where health conditions or medication matter. This article reports the research context; it does not prescribe a weight-based caffeine regimen or guarantee a faster time, greater strength or improved recovery.

The conversation
A good question can make a better brew.