From what I can tell, what you are asking is as follows:
In an hour, a donkey travels from $a_1$ to $a_2$ at a constant rate. A horse travels from $b_1$ to $b_2$ at a constant rate. Do they ever meet?
The easiest way to answer this, would be to draw a graph where the $y-$axis represents the position, and the $x-$axis represents the time taken. For the donkey, we are drawing a line from $ (0, a_1)$ to $(1, a_2)$. For the horse, we are drawing a line from $(0, b_1)$ to $(1, b_2)$. If the lines intersect, then that defines a meeting point.
The equation of the line for the donkey is $ y = (a_2 - a_1) x + a_1$ and the equation of the line for the horse is $ y = (b_2 - b_1) x + b_1$. The intersection point of these lines is given by $ x^* = \frac{ a_1 - b_1} { (b_2 - b_1) - (a_2 - a_1) } $ and it's corresponding $y $ value.
Subject to the condition of this question, the animals will meet during their journey if and only if $ 0 \leq x^* \leq 1 $, or equivalently
$$ 0 \leq \frac{ a_1 - b_1} { (b_2 - b_1) - (a_2 - a_1) } \leq 1.$$