Let us assume that the horizontal direction is given by the coordinate $x$ and the vertical direction by $y$. We want to make use of the formula for the trajectory of a point particle in a gravitational field, which can be acquired by integrating acceleration twice, and is given by
$\vec{r}=\frac{1}{2}\vec{g}t^2+\vec{v_0}t+\vec{r_0},$
where $\vec{r}$ is the trajectory, $\vec{g}$ the gravitational acceleration, $\vec{v_0}$ the initial velocity, $\vec{r_0}$ the initial position and $t$ time.
We need to treat the components separately, for which we get
$r_x=v_{0x}t+r_{0x}$
and
$r_y=-\frac{1}{2}gt^2+v_{0y}t+r_{0y}.$
In these equations, we know all quantities except for $t$ and $v_{0y}.$ Since we have two equations for two unknown variables, the problem can easily be solved. All you have to do is express $t$ from the first equation and plug it into the second equation. Then you can find an expression for your desired quantity, the vertical velocity.