Hello and welcome to MathHelpForum.
You should understand that this is not a homework service nor is it a tutorial service. Please either post some of your own work on this problem or explain what you do not understand about the question.
It's not homework, actually. I'm studying for a test and trying to understand something my teacher said in class the other day. I do not understand how to do the question, or why the answer is what it is, and I would like to understand open and closed sets. I thought maybe by understanding this basic question, I would be able to figure out other things that stem off of this one. If somebody could explain why the first two are open and why the second two are closed, and possibly show me how I would go about proving it, I would be helped tremendously in understanding this question. Thank you.
Closed is usually defined as "its complement is open", so it's enough to prove that the open intervals are indeed open. Try showing that for any point in one of the open intervals, you can find a smaller open interval around that point and contained in the original interval.