I've learned the Extreme Value Theorem, where if a continuous function is contained in a compact set, then it has a global min/max in the set.
And from here, I can see that open sets do not have minimums. But do they have maximums?
Edit: For example, we're currently doing Lagrange optimization in class, and it would be nice to be able to prove the set is open and thus has no max/min to avoid doing problems that have no solution.
Follow-up question then: why does showing that U is open help then in showing that f doesn't attain a max/min there? (that's the end of the solution my prof provided. I found it weird that he stopped there)

It seems to me you are a bit confused: you start by minimizing a function, and then you switch to minima of a subset of $\mathbb{R}$. Although these things are obviously linked, you should be careful. Indeed, a function can attain a maximum on an open set, think of $f(x)=1-x^2$ in $(-1,1)$.
So no, you cannot stop looking for maxima of a function as soon as you realize that its domain is an open set.
As regards your edit, please notice that your professor writes: first show that $U$ is open. In other words, you should now complete the reasoning. As a further hint, you are trying to maximize a linear function, and it is rather clear (why?) that a linear function cannot generically attain a maximum inside an open set.