Let the speed of Anil be $a$ km/hr, and the speed of Sunil be $s$ km/hr.
- The total distance between A and B is 45 km. - They cross each other in 1 hour 30 minutes, or 1.5 hours, so during this time, they together cover the entire distance of 45 km:
$a \times 1.5 + s \times 1.5 = 45$,
$1.5(a+s) = 45$,
$a + s = 30$. (Equation 1).
After crossing each other, Anil takes 1 hour 15 minutes longer than Sunil to reach B.
So, the time taken by Anil to reach B is $\frac{45}{a}$ and the time taken by Sunil to reach A is $\frac{45}{s}$.
According to the problem:
$\frac{45}{a} = \frac{45}{s} + 1.25$.
Multiply both sides by $a$ and $s$:
$45s = 45a + 1.25as$.
Rearranging:
$45s - 45a = 1.25as$,
$45(s - a) = 1.25as$.
Now use Equation 1 to solve this system and find $a = 12$.