47 years old, weight gain of 2.5 pounds in one week, ankles sore but not swollen, became lightheaded riding bike. Blood pressure fine. What is it?

Transient Vertigo. Is not uncommon when starting up with an aggressive aerobic exercise regimen. If you were riding your bicycle hard enough to develop sore ankles, there could be an association. Although unusual, it is possible to actually gain a couple of pounds during the first week of an exercise program as protien is heavir than fat. If your symptoms persist, you may want to check in with your family doc.
Need more info... This can be a lot of things and requires a good history and physical by your doctor. Lightheadedness while riding the bike is especially concerning (you might have an accident!) and could be because of the heart, lungs, electrolyte imbalance, anemia... Lots of things. The weight gain could be a red herring. Bottom line... Please see your doc for this sooner rather than later!