I solved this problem $$\left\{\begin{array}{ll} u_{t}=ku_{xx}, & x\in(0,1), t>0 \\ u(0,t)=2, u(1,t)=3, & t>0 \\ u(x,0)=x^{2}+x+2, & x\in(0,1) \end{array}\right.$$ and I got this $$u(x,t)=2+x+\sum_{n=1}^{\infty} c_{n}e^{-n^{2}\pi^{2}kt}\sin(n\pi x)$$
About this, I had no problem.
My questions are (actually, my teacher's questions):
1- After a long time, is there any point in the bar which the temperature is $10^ºC$? If yes or no, why?
2- Can I use the fact that both temperatures in the bar's extremes are less than 10? If not, how could I answer this?
There is a property of certain PDEs known as the Maximum Principle. (See these notes (pdf warning) for its application to the heat equation.)
The maximum principle states that any solution $u(x,t)$ of the heat equation in a region of $(x,t)$ must have its extrema (minimum and maximum values) on the boundary of that region.
In this case, the region is $(x,t)\in[0,1]×[0,\infty)$. The boundary of this region has three parts: On $(x=0,t>0)$ the solution is fixed at 2. On $(x=1,t>0)$ the solution is fixed at 3. On $(x,t=0)$ the maximum value of 4 occurs at $x=1$. Thus 4 is the maximum value of u(x,t) which occurs on the boundary. By the maximum principle 4 is therefore the maximum value for all $x$ and $t$.
So $u(x,t) = 10$ cannot occur for any $x$ and $t$.