Finding the speed of a person After hours of struggling I'm posting it here. I hope someone will solve it.

David and Jess start at the same time from points $A$ and $B$ and travel towards $B$ and $A$ respectively. After they meet, David takes $40$ minutes to reach $B$ and Jess takes $1.5$ hours to reach $A$. If David's speed is $36$ km/h, what is Jess's speed?

My Work:
if two people P and Q start at the same same time from A and B, after crossing each other they take X and Y seconds to reach B and A then P's speed : Q's speed = squareroot(y) : squareroot(x). i.e squareroot(1.5*60):squareroot(40) which is 3:2. so Jess's speed 36*2/3= 24Kmph. But i dont understand how P's speed : Q's speed = squareroot(y) : squareroot(x).
 A: Let $S_D$ be Dave's speed, and $S_J$ be Jess's. Say they meet at time $t$ at distance $d_1$ from $A$ and $d_2$ from $B$. We can write $t=d_1/S_D$  and $t = d_2/S_J$ and combine them into
$$\frac{d_1}{d_2} = \frac{S_D}{S_J}.$$
On the latter part of the journey, 
we can write similar equations $40=d_2/S_D$ and $90=d_1/S_J$ and combine these into
$$\frac{d_1}{d_2} = \frac{90S_J}{40S_D}.$$
Combining this with the equation above we get
$$90S_J^2 = 40S_D^2,$$
or
$$S_J = \frac23 S_D.$$
$S_D = 36/60$ km/minute so $S_J=24/60$ km/minute, or $24$ kph.
A: David needs x+2/3 hours at 36 km/h, so the full distance is 36*(x+2/3) km, right?
Jess needs x+3/2 hours for the 36*(x+2/3) km, so he travels 36*(x+2/3)/(x+3/2).
David will need x hours for 36x km
Jess will need x hours for 36*(x+2/3)/(x+3/2) km.
So the full distance is 36x+36*(x+2/3)/(x+3/2).
36*(x+2/3) = 36x+36*(x+2/3)/(x+3/2)
or shorter
(x+2/3) = x+(x+2/3)/(x+3/2)
which then is 
2/3 = (x+2/3)/(x+3/2)
(x+3/2)*2/3 = (x+2/3)
2x/3+1 = x+2/3
2x/3-x = 2/3-1
x = 1

Quod errat demonstrator.
