Hints:
Clearly $\;\{1\,,\,x-12\}\;$ is a basis for $\;U:=Span\{1\,,\,x-12\}\;$. Now, apply Gram-Schmidt to orthonormalize this basis:
$$||1||:=\left(\int\limits_a^bdx\right)^{1/2}=\sqrt{b-a}\implies u_1=\frac1{\sqrt{b-a}}$$
$$v_2=(x-12)-\frac{\langle x-12\,,\,u_1\rangle}{||u_1||^2}u_1=(x-12)-\frac1{b-a}\left(\int\limits_a^b (x-12)dx\right)=$$
$$=(x-12)-\frac1{b-a}\left(\frac12(b^2-a^2)-12(b-a)\right)=x-12-\frac12(a+b)+12=$$
$$=x-\frac12(a+b)\implies ||v_2||=\left(\int\limits_a^b\left(x-\frac12(a+b)\right)dx\right)^{1/2}=\ldots\implies u_2=\frac{v_2}{||v_2||}$$
The set $\;\{u_1,u_2\}\;$ is an orthonormal base of $\;U\;$, and thus the orthogonal projection on $\;U\;$ is given by
$$P_U:=u_1u_1^t+u_2u_2^t$$
Other way to do it: Using the hint you were given, prove that in fact
$$P_U=A\left(A^tA\right)^{-1}A^t\;,\;\;\text{with}\;\;A=\text{the matrix according to the original vectors}$$
$$1\,,\,x-12\;\;\text{of}\;\;U$$
The range of $P_U$ is two dimensional. How did you conclude that it is whole of $\mathbb R^{3}$? I did not check all your calculations but your method is correct and it is likely that you have obtained the projection correctly.
Edit: I have checked your calculations and everything seems perfect. Your $P_U$ is the projection with range $U$.
Best Answer
We have: $$\langle g,h\rangle = 0,\quad \langle g,g\rangle = \frac{1}{12},\quad \langle h,h\rangle = 1,$$ while: $$ \langle f,g \rangle = \frac{1}{3},\quad \langle f,h \rangle = -\frac{8}{3},$$ hence the projection of $f$ on $\operatorname{Span}(g,h)$ is given by: $$ f^{\perp} =4g-\frac{8}{3}h = 4x-\frac{14}{3}. $$