To total number of minutes spent is $10+19+7=36$ minutes. So according to your specification the three riders should pay $\frac{10}{36}$, $\frac{19}{36}$ and $\frac{7}{36}$ of the total fare, respectively.
Since 1725 is not a multiple of 36, some cent rounding will be necessary.
One practical solution would be to decide that each minute in the taxi costs half a dollar; that will raise \$18, and then either give each rider a quarter back, or give B 50 cents and A 25. The latter option brings everyone within 15 cents of their exact share, and spending time worrying about the pennies will probably not be cost effective.