Answer
The mass of the water is 500 kg
Work Step by Step
We can use conservation of momentum to find the mass of the water $m_w$. Let $m_c$ be the mass of the train car.
$p_f=p_0$
$m_f~v_f = m_c~v_0$
$(m_c+m_w)~v_f = m_c~v_0$
$m_w~v_f = m_c~(v_0-v_f)$
$m_w = \frac{m_c~(v_0-v_f)}{v_f}$
$m_w = \frac{5000~kg~(22.0~m/s-20.0~m/s)}{20.0~m/s}$
$m_w = 500~kg$
The mass of the water is 500 kg.