I drove to the beach at a rate of $40$ miles per hour. If I had driven at a rate of $55$ miles per hour instead, then I would have arrived $25$ minutes earlier. How many miles did I drive?

Let the number of miles driven be $d$. The time it took to arrive at the beach traveling at $40$ miles per hour was $d/40$. The time it would have taken to arrive at the beach traveling at $55$ miles per hour is $(d/55)-\frac{25}{60}=(d-55(25))/330$ hours. Thus $d/40=(d-55(25))/330$. We multiply both sides by $40\times330=16,500$ to obtain $330d=16,500(d-55(25))=16,500d-16,500(55(25))$. Rearranging the equation gives $16,170d=16,500(55\times25)=9,075,000$. Thus $d=9,075,000/16,170=\boxed{561}$.