Let $\eta$ be a function in a space $\mathbb{K}$ which satisfies the above boundary conditions and let $\mathbb{K}^{\prime}$ be a subspace of functions that satisfy the homogeneous boundary conditions spanned by $\{\psi_{1},\psi_{2},\dots\psi_{n}\}$ and look for a solution of the form
$$v_{n} = \eta + \sum_{i=1}^{n} a_{i}\psi_{i}.$$
Select a sequence of points $x_{1} < x_{2} < \dots < x_{n}$ all in $[0,3]$ and require
$$e_{n} = \frac{d^{2}h}{dx^{2}}$$
to be zero at these points. The Galerkin method then requires that $e_{n}$ is orthogonal to $\mathbb{K}^{\prime}$. Setting $\langle u,v\rangle = \int_{0}^{3} uv\,dx$ we have for $j=1,\dots,n$
\begin{align*}
0 &= \langle v_{n}^{\prime\prime},\psi_{j}\rangle\\
&= \int_{0}^{3}v_{n}^{\prime}\psi^{\prime}_{j}\, dx\\
&= \int_{0}^{3} \psi_{j}^{\prime}\sum_{i=1}^{n}a_{i}\psi^{\prime}_{i}\, dx + \langle\eta^{\prime},\psi_{j}^{\prime}\rangle
\end{align*}
which should be more than enough of a headstart.