I think there is an error in the solution. Is it correct? I read the solution and think there is an error in the solution.

I think $z_1$ in red boxes should be changed to m.

Am I correct? Or did I misinterpret the solution?

I think the key is that m(the lowest f value)) can't be an interior point!
I'm a bit confused about this solution to start with.  We are talking about f on an open set, which is certainly not compact, so there is no guarantee it will attain a max or min there; you can close the interval of course and get your max and min.  That said, I think we can do this solution better.

Let us suppose f is not monotonic on the interval (a,b).  Then it has either a minimum or a maximum inside (a,b). Call that point c. If c is the absolute max or min, whatever f maps (a,b) into, it will contain f(c) as an endpoint and cannot be open.

Suppose c is only a local max or min.  Then consider the problem on an interval (q,r) around c where c is the absolute max or min.  So as per the above paragraph whatever f maps (q,r) into it must contain f(c) as an endpoint and cannot be open.

The arguments below can be applied to (a,b) if c is an absolute max/min or (q,r) if c is a local max/min. 

Turning it around, suppose the mapping of (a,b) is not open and its included endpoint is f(c).  Then f(c) must be &le; f(a) or f(c) &ge; f(b) -- either way  f is not monotonic on (a,b).

Note that if f is indeed monotonic on (a,b), then its map of (a,b) will certainly be open, because it will be exactly (f(a), f(b)).

What you need to do to finish up is: if f is an open mapping and so maps every open interval into an open interval,  it has to be monotonic on  on the entire x-axis.  I suspect you have to fuss around a little to nail down that last statement. For example, you might start with (-1,1) and keep expanding to larger intervals -- no matter how large an interval you choose, f will be monotonic, so this must apply to the real line.
I'm a bit confused about this solution to start with.  We are talking about f on an open set, which is certainly not compact, so there is no guarantee it will attain a max or min there; you can close the interval of course and get your max and min.  That said, I think we can do this solution better.

Let us suppose f is not monotonic on the interval (a,b).  Then it has either a minimum or a maximum inside (a,b). Call that point c. If c is the absolute max or min, whatever f maps (a,b) into, it will contain f(c) as an endpoint and cannot be open.

Suppose c is only a local max or min.  Then consider the problem on an interval (q,r) around c where c is the absolute max or min.  So as per the above paragraph whatever f maps (q,r) into it must contain f(c) as an endpoint and cannot be open.

The arguments below can be applied to (a,b) if c is an absolute max/min or (q,r) if c is a local max/min. 

Turning it around, suppose the mapping of (a,b) is not open and its included endpoint is f(c).  Then f(c) must be &le; f(a) or f(c) &ge; f(b) -- either way  f is not monotonic on (a,b).

Note that if f is indeed monotonic on (a,b), then its map of (a,b) will certainly be open, because it will be exactly (f(a), f(b)).

What you need to do to finish up is: if f is an open mapping and so maps every open interval into an open interval,  it has to be monotonic on  on the entire x-axis.  I suspect you have to fuss around a little to nail down that last statement. For example, you might start with (-1,1) and keep expanding to larger intervals -- no matter how large an interval you choose, f will be monotonic, so this must apply to the real line.