Hi there! Why would you combine fasting and exercise? Exercise requires energy. You get that from food.
There’s no rule about how long you have to wait after eating to exercise, or how long you have to wait after exercise to eat. Eat when you’re hungry. Stay properly nourished. Exercise to be healthy, not to lose weight.