Cyclist travels from pt b to pt a at a speed of X km/hr the he travels at X-3 km/hr since total time taken is 50 mins or 50/60 hr
3/X + 3/X-3 = 5/6
solving for x we get 9km/r.
This is exactly right.
For the record, it's important to point out that on the test, there would be five answer choices. With complicated rate problems, plugging in the answers is nearly always a great way to go, especially in a problem like this. Even if the math makes no sense, you could start with 9 km/hr, figure out how long it takes to go the first three km, and then do the same with 6 km/hr, and the answer would be 50 min.
No other answer would make that work, and it would probably take less time than figuring out the math.