C = sqrt(e/m)
You can get this by first dividing away the m and then taking the square root of both sides.
Well, their speeds are (

is Jack's speed, and

is Richard's.

They, together, can paint 12 houses in 35 days. To get a single house, we only have to calculate

which is very close to 3 (a bit below)
386 is the answer.................................