A. use the formula d=v/t and rearrange it for time to t=d/v, since you have two v values (v_r and v_w), change the equation to t= (d/2vw)+(d/2vr). The two is in there because you multiple the distance by (1/2) which puts the two into the denominator.
B. The average speed is found by rearranging...