We can and do assume $0\le x\le y\le 36$. Then
$$
S(x,y)=\sqrt y-\sqrt x\le \sqrt {36} -\sqrt 0=6-0=6\ ,
$$
and this is the maximal value of the expression $S(x,y)$, it is obtained if and only if we have equality in the $\le$, i.e. $y=36$, $x=0$.
Note: We can better take $x=y=18$, this is a simpler situation, because the expression is not maximal, and in this case we do not need to find anything. (The question was "Find the numbers if the difference...") The problem should give the information if the difference of the square roots of $x,y$ is indeed maximal, so that we can decide if we want to find $x,y$. We may try to find the values in both cases, but in case we do not have maximality, we also do not have further information.