or part a, average speed is total distance over total time. The key to the problem is just setting the unknown distance between point A and point B as a variable "d". Use the relation distance = speed*time to find the time required to travel each leg of the journey (in terms of d). You will find that this variable
Reference https://www.physicsforums.com/threads/average-speed.675546/