Answer
$27.0\ mi$ (from B)
$33.5\ mi$ (from A)
Work Step by Step
Step 1. Based on the given conditions, draw a diagram as shown in the figure (not to scale).
Step 2. We can identify angle $A=90^\circ-48^\circ=42^\circ$, angle $B=90^\circ-34^\circ=56^\circ$, and angle $C=180^\circ-42^\circ-56^\circ=82^\circ$
Step 3. Using the Law of Sines, we have $\frac{sin42^\circ}{a}=\frac{sin82^\circ}{40}$, thus $a=\frac{40sin42^\circ}{sin82^\circ}\approx27.0\ mi$
Step 4. Similarly, we have $\frac{sin56^\circ}{b}=\frac{sin82^\circ}{40}$; thus $b=\frac{40sin56^\circ}{sin82^\circ}\approx33.5\ mi$