The distance from the origin is

The line concenrned is y = 2x.

At any point (x, y) on the line, the distance is

Using what you've got, you have:

Now, you have got the line y = 2x.

Use simultaneous equations to find the x coordinate of B.

Depending on where point B lies, relative of the origin, you can have 2 different answers.