Hi there I need some help with this problem

sorry if this is in the wrong place, Im a new member here

A bug is crawling on the coordinate plane from (5,9) to (-15,-7) at constant

speed one unit per second except in the second quadrant where it travels at 1/2

units per second. What path should the bug take to complete its journey in as

short a time as possible?

So far I drew a picture of it and I was assume the shortest amount of time would be to draw a diagonal line connecting the points together and then calculating the time, but it doesn't feel correct to me. I hope someone can help/guide me through this problem, so I can understand how to do this, thanks.