Find the maximum number of students the class can contain. A pair of students is selected at random from a class.The probability that the pair selected will consist of one male and one female student is $\frac{10}{19}$.Find the maximum number of students the class can contain.

Let the class has $x$ boy students and $y$ girl students.
Probability of selecting a boy student and a girl student is $\frac{x}{x+y}\times\frac{y}{x+y}=\frac{xy}{(x+y)}$
When a pair of students is selected at random from a class,there are four possibilities $BB,GG,GB,BG$.so one boy and one girl has probability $\frac{1}{4}$
So $\frac{1}{4}\times\frac{xy}{(x+y)}=\frac{10}{19}$

I am stuck here and i dont know how to find the maximum number of students in the class.I am not even sure if my steps are correct.

Another way to proceed after obtain the equation
$$ \frac {xy} {(x + y)(x + y - 1)} = \frac {5} {19}$$
Note that $x, y$ are positive integers. Let 
$$m = x + y$$
such that
$$xy = \frac {5} {19}m(m - 1) $$ 
Then these two quantities are the sum and product of roots of the following equation respectively
$$ z^2 - mz + \frac {5} {19}m(m - 1) = 0 $$
i.e. $\{x, y\}$ are the roots of this equation. The roots are given by
$$ \begin{align*} z & = \frac {1} {2}\left(m \pm \sqrt{m^2 - 4 \times \frac {5} {19}m(m - 1)}\right) \\
& =  \frac {1} {2}\left(m \pm \sqrt{\frac {m(20 - m)} {19}}\right)
\end{align*}$$
One necessary condition is that the discriminant is non-negative so that we have real roots. Note $m$ is also a positive integer, so from the numerator of the discriminant, we can see that
$$ m(20 - m) \geq 0 \iff m \in \{1, 2, \ldots, 20\} $$
One more necessary condition is that the discriminant is a perfect square. $m = 20$ will do as the whole discriminant vanish, and immediately yields the answer
$$ x = y = 10$$
$m = 19$ also satisfy the above condition, but since you want to find the maximum value of $m$ which you already have, so you do not need to consider it.
