i) Show that there does not exist a smooth function $f:\mathbb{R} \rightarrow \mathbb{R}$, s.t. $f(x) \geq 0$, $\forall x \in \mathbb{R}$, $f$ has exactly two critical points, $x_1,x_2\in\mathbb{R}$ and $f(x_1)=f(x_2) = 0$. (This part is easy).
ii) Show that there does not exist a smooth function $f:\mathbb{R}^2 \rightarrow \mathbb{R}$, s.t. $f(x,y) \geq 0$, $\forall (x,y) \in \mathbb{R}^2$, $f$ has exactly two critical points, $(x_1,y_1),(x_2,y_2)\in\mathbb{R}^2$ and $f(x_1,y_1)=f(x_2,y_2) = 0$.
I have tried several methods, however, it does not work, could anybody help me out?
Your topology instinct is right. If you consider the portion of the graph of $f$ inside a big ball, you will have two minima. If you cap off the boundary of that portion, you will have a topological sphere, with $\chi =2$. The height function has a maximum and two minima, which would give $\chi=3$. (I'm assuming nondegenerate critical points here.)
I'm still pondering an elementary argument. It would be helpful to know what you've learned/proved in your course.