I actually found the answer. Here is my explanation:

As it may seem very complex or impossible, it is not and in fact, just add in variables. \(u\) for the distance of going uphill, \(f\) for the distance of flat ground, \(d\) for the distance of going downhill, and \((u+f+d)\) for the total distance walked.

To find the average speed, the equation we need to set up must be the total distance over the total time. We first make the equation for the first trip's time. We would divide \(u\) by 100(the speed of going uphill), \(f\) by 120(the speed of going across flat ground), and \(d\) by 150(the time going downhill). It would look like this:

\(\frac{u}{100} + \frac{f}{120} + \frac{d}{150}\)

Next, we would set up the equation for the second trip going in reverse. We would divide \(u\) by 150 this time instead of 120 because we are walking the other way and the same for \(d\). We would keep \(f\) the same since its neutral no matter which way you are walking across it. Here is what it would look like:

\(\frac{u}{150} + \frac{f}{120} + \frac{d}{100}\)

Now to get the total time, we must add them together.

\(\frac{u}{100} + \frac{f}{120} + \frac{d}{150} + \frac{u}{150} + \frac{f}{120} + \frac{d}{100}\)

We find a common denominator, which is 600, and then add them all together.

\(\frac{6u}{600} + \frac{5f}{600} + \frac{4d}{600} + \frac{4u}{600} + \frac{5f}{600} + \frac{6d}{600}\)

\(\frac{6u+4u+5f+5f+4d+6d}{600}\)

\(\frac{10u+10f+10d}{600}\)

Now we can factor and simplify. As we can see below, we can factor out 10 and simplify.

\(\frac{10(u+f+d)}{600}\)

\(\frac{u+f+d}{60}\)

Now, we know that \((u+f+d)\) is the distance for one trip so the total distance would be \(2(u+f+d)\) and \(\frac{u+f+d}{60}\) is the total time. Now we divide the total distance and the total time that we have gotten.

\(\frac{2(u+f+d)}{\frac{u+f+d}{60}}\)

We multiply by 60 top and bottom to get \(\frac{120(u+f+d)}{u+f+d}\). Lastly, we simplify by dividing top and bottom by \((u+f+d)\) to get the final answer of 120.