Added: The rock leaves the surface of mars with maximum speed, moves up rectilinearly with decreasing speed until it reaches the top, where the speed is zero, and then moves down with increasing speed until it reaches the surface of mars at the point of departure with a speed that is equal (in absolute value) to the starting speed. This can be justified by finding the equation of the velocity of the rock (equation $(2)$ below).
I need to do is set it equal to 25 so $25=15t−1.86t^2$.
Yes. Note that this equation has two solutions I compute below.
I know I will need to find the derivative but not sure how.
You just have to add to your equation
$\begin{equation} 25=15t-1.86t^{2},\tag{1}\end{equation}$
which has two solutions, let's call them $t_{1}$ and $t_{2}$, the equation of the velocity of the rock as a function of $t$ and evaluate it at those two instants $t_{1}$ and $t_{2}$. Since the velocity is the derivative of the height $h(t)$ the equation is$^1$
$\begin{equation} v=h^{\prime }(t)=\frac{d}{dt}\left( 15t-1.86t^{2}\right) =15-2\times 1.86t. \end{equation}\tag{2}$
I decided to insert here the following picture which represents the motion of the rock as a function of the time $t$, i.e. the graph of $h(t)=15t-1.86t^{2}$ (the distance to the surface of mars), to which I added the line $h=25$ m, though it is not necessary to find the analytical solution of the problem. This line intersects the graph at instants I compute below $t_1, t_2$, with $t_1.

The solutions of $(1)$ are (the approximated values are not necessary to be computed, you just need to use the exact values):
$\begin{eqnarray*}t_{1} &=&\frac{15-\sqrt{15^{2}-4\times 25\times 1.86}}{2\times 1.86}\approx 2.3535\text{ h,} \\t_{2} &=&\frac{15+\sqrt{15^{2}-4\times 25\times 1.86}}{2\times 1.86}\approx 5.711\text{ h.} \end{eqnarray*}\tag{1'}$
Added: Here is a picture of the graph of $h'(t)$ (green) together with the graph of $h(t)$ (black)

By $(2)$ the velocity at the instant $t_{1}$ is $\begin{eqnarray} v_{1}=v(t_1) &=&15-2\times 1.86\left( \frac{15-\sqrt{15^{2}-4\times 25\times 1.86}}{2\times 1.86}\right) \\ &=&15-\left( 15-\sqrt{39}\right) \\ &=&\sqrt{39}\approx 6.245\text{ m/s} \\ &&\text{(the rock is moving upward),}\tag{3} \end{eqnarray}$
while the velocity at the instant $t_{2}$ is $\begin{eqnarray} v_{2}=v(t_2)&=&15-2\times 1.86\left( \frac{15+\sqrt{15^{2}-4\times 25\times 1.86}}{2\times 1.86}\right) \\ &=&15-\left( 15+\sqrt{39}\right) \nonumber \\ &=&-\sqrt{39}\approx -6.245\text{ m/s} \\ &&\text{(the rock is moving downward).} \tag{4} \end{eqnarray}$
Note that as one should have expected the velocities are symmetric.
Comment: The velocity is a vector pointing up ($v>0$) or down ($v<0$) in the present case, because the motion is rectilinear. Its absolute value is the speed. At $h=25$ we have $v(t_1)>0$, $v(t_2)<0$ and $|v(t_1)|=|v(t_2)|$.
--
$^1$ The derivative $h^{\prime }(t)$ can be computed in detail as follows: $\begin{eqnarray*} h^{\prime }(t) &=&\frac{d}{dt}\left( 15t-1.86t^{2}\right) \\ &=&\frac{d}{dt}\left( 15t\right) -\frac{d}{dt}\left( 1.86t^{2}\right) \qquad \text{sum rule} \\ &=&15\frac{dt}{dt}-1.86\frac{d}{dt}\left( t^{2}\right) \qquad \text{product rule} \\ &=&15\times 1-1.86\times 2t\qquad \text{power rule} \\ &=&15-1.86\times 2t\text{.} \end{eqnarray*}$