Alright, so by creating a right triangle with side a, point A, and point P,we can get that a^2+A^2 (if A is the distance from A to P) = P^2 (if P is the distance from P to the rowboat) using the Pythagorean Theorem. After that, we know that he will walk x miles to point B. Since b is A+x, we know that b=A+x and
b-x=A by subtracting x from both sides. Therefore, a^2+(b-x)^2=P^2 and by plugging a=2 and b=8 in, we get 2^2+(8-x)^2=P^2. To find out P, we square root both sides, getting P= sqrt(4+(8-x)^2). Since the man rows 2 miles per hour, we can divide P by 2 to get how much time it takes for him to travel to point P, resulting in sqrt(4+(8-x)^2)/2. In addition, we can divide x by 4 as the man walks 4 miles per hour, getting x/4. Adding them up, we get
sqrt(4+(8-x)^2)/2+x/4 as the amount of time it will take to get to point B