What's the most elementary way to solve this trigonometric problem?
This is a slight variation on the answer of @leoli1 which omits the square roots. So start with $$\begin{eqnarray} y^2+1&=& \lvert BC \rvert^2 \\ (y+2)^2+1&=& \lvert AC \rvert^2 \end{eqnarray}$$ but now note instead that $$ \lvert AC \rvert^2 = (4 - \lvert BC \rvert)^2.$$ Subtract the first equality above from the second to find $$4y + 4 = 16 - 8 \lvert BC \rvert$$ so $\lvert BC \rvert = (3 - y)/2$. Substitute this back in the first equality to get a quadratic equation for $y$.
Notice that by Pythagoras we have: \begin{align} y^2+1&= \left\vert BC\right\vert^2\\ (2+y)^2+1&= \left\vert AC\right\vert ^2 \end{align} Taking roots and adding both equations yield: $$\sqrt{y^2+1}+\sqrt{(2+y)^2+1}=\left\vert BC\right\vert+\left\vert AC\right\vert=4$$ Now we can solve this equation to get the value of $y$.
We know the side $c=2$ and the altitude $h_c=1$, hence the area of the triangle is $S=\frac12ch_c=1$.
We also have Heron's formula for the area:
$$S=\sqrt{p(p-a)(p-b)(p-c)}$$
With $p=\dfrac{a+b+c}2=3$.
Hence
$$(p-a)(p-b)=\frac{S^2}{p(p-c)}=\frac13$$
$$p^2-(a+b)p+ab=p(p-a-b)+ab=\frac13$$
$$ab=\frac13+3=\frac{10}{3}$$
Now, we know $a+b$ and $ab$, hence:
$$(a-b)^2=(a+b)^2-4ab=16-\frac{40}{3}=\frac83$$
And since the larger side is $b$,
$$a-b=-2\sqrt{\frac23}$$
$$a=\frac12(a+b+a-b)=\frac12(4-2\sqrt{\frac23})=2-\sqrt{\frac23}$$
Now, with Pythagoras' theorem in the triangle BDC:
$$y=\sqrt{a^2-1}=\frac13\sqrt{33-12\sqrt6}=\frac13\sqrt{24-2\times3\times2\sqrt6+9}=\frac{2\sqrt6-3}3=\frac{2\sqrt6}3-1$$