Suppose is open whenever is open. Let and . Since the ball is open, so is . Since . Since is open there exists a such that . This implies making continuous at . Since was arbitrary, is continuous.
Suppose is closed whenever is closed. Let be open. Then is closed. By the hypothesis, is closed.
If , then and . Similarly, if then , and . Therefore .
Now, is closed, so is open. So is open whenever is open. From part (i), is continuous.
Suppose is continuous. Let be closed. Let converge to . Since is continuous converges to . Since is closed, and so which means is closed (since this is the limit of the arbitrary sequence chosen above). Therefore is closed whenever is closed.