\begin{align}
\frac1{40}=\lim_{x\to25}\frac{\sqrt{x}-5}{ax+b}&=\lim_{x\to25}\frac{\sqrt{x}-5}{ax+b}\cdot\frac{\sqrt{x}+5}{\sqrt{x}+5}\\
\frac1{40}&=\lim_{x\to25}\frac{x-25}{(ax+b)(\sqrt{x}+5)}
\end{align}
Observe that by substituting $x=25$ into $\sqrt{x}+5$ we get $10$. Therefore, that missing factor of $4$ that we want (to make the denominator $40$) must come from $ax+b$. We also know that $x-25$ is a factor of $ax+b$. Thus, we can write
\begin{align}
ax+b&=4(x-25)\\
ax+b&=4x-100
\end{align}
Therefore, $\boxed{(a,b)=(4,-100)}$. To show that this is the solution, we can evaluate the limit:
\begin{align}
\lim_{x\to25}\frac{\sqrt{x}-5}{4x-100}&=\lim_{x\to25}\frac{\sqrt{x}-5}{4(x-25)}\cdot\frac{\sqrt{x}+5}{\sqrt{x}+5}\\
&=\lim_{x\to25}\frac{x-25}{4(x-25)(\sqrt{x}+5)}\\
&=\lim_{x\to25}\frac{1}{4(\sqrt{x}+5)}\\
&=\frac{1}{4(\sqrt{25}+5)}\\
&=\frac{1}{4(10)}\\
&=\frac{1}{40}
\end{align}