If you assume that the two masses of water only transfer heat energy to each other and not to their surroundings, then you assume that the heat energy lost by the hotter water is the same as the heat energy gained by the cooler water.
Q = m*c*(T1-T2)
Is the amount of heat energy required to raise an object with mass "m" and specific heat "c" from temperature "T2" to temperature "T1."
m1*c1*(T_hot - T_f) = m2*c2*(T_f - T_cold)
Where T_hot is the temperature of the hotter object, m1 is the mass of the hotter object, c1 is the specific heat of the hotter object, (T_cold,m2,c2 for the colder object), and T_f is the final equilibrium temperature of both objects.
In your case, c1=c2 since both the objects are water. Reducing the above equation, the final temperature is
T_f = (m1*T_hot + m2*T_cold)/(m1+m2)