2021 WSMO Team Round/Problem 7
Problem
A frog makes one hop every minute on the first quadrant of the coordinate plane (this means that the frog's and coordinates are positive). The frog can hop up one unit, right one unit, left one unit, down one unit, or it can stay in place, and will always randomly choose a valid hop from these 5 directions (a valid hop is a hop that does not place the frog outside the first quadrant). Given that the frog starts at , the expected number of minutes until the frog reaches the line can be expressed as , where and are relatively prime positive integers. Find .