The molecular formula of water and ammonia is
and
respectively.
From the atomic symbol of water it is clear that 1 mole of water contains 2 moles of hydrogen.
So,
molecules of water contains
atoms of hydrogen.
From the atomic symbol of ammonia it is clear that 1 mole of ammonia contains 3 moles of hydrogen.
So,
molecules of ammonia contains
atoms of hydrogen.
Total number of hydrogen atoms present in the solution = number of hydrogen atoms in water + number of hydrogen atoms in ammonia.
Substituting the values,
Total number of hydrogen atoms present in the solution =

Total number of hydrogen atoms present in the solution =
.
Hence, the total number of hydrogen atoms present in the solution is
atoms.