The total capacity of the park's fountain is 2477 gallons. If each tank of water is 95 gallons, then calculate the value of A and B.