Okay, you haven't responded yet, but I'm worried that maybe you're still confused, so maybe this will help.

We can look at this problem a few different ways. For completeness, I'll just type out all 4 ways so hopefully you see how it all fits.

**Situation 1**: We chose to write 8x+4y=320, and we let y = f(x).

This is the book answer.

In this case, the domain is 0 < x < 40 and the range is 0 < y < 80.

**Situation 2**: We chose to write 8x+4y=320, and we let x = f(y).

Then the domain is 0 < y < 80 and the range is 0 < x < 40.

**Situation 3**: We chose to write 8y+4x=320, and we let y = f(x).

Then the domain is 0 < x < 80 and the range is 0 < y < 40.

**Situation 4**: We chose to write 8y+4x=320, and we let x = f(y).

Then the domain is 0 < y < 40 and the range is 0 < x < 80.

See how it's always the same, but with certain things switched with each other.

I hope it's clear now. If not, just ask.