1) The energy cost of the desalination would have to be added to the energy budget of the hydrogen production.
2) The atomic weight ratio of oxygen to hydrogen is something like 16 to 1, even with H2 and O1 you end up with a ratio of 8 to 1, so about 100g hydrogen in weight per kg of water.
1) My point is that the actual market cost of desalinated water includes the energy cost - and probably more expensive energy than a dedicated desal plant for hydrogen production would because both run at times and in places where energy is cheap.
2) My calculation above already took the mass fraction into account, and added a generous fudge factor in case not all of the desalinated water can electrolysed and some ends up being wasted.
2) The atomic weight ratio of oxygen to hydrogen is something like 16 to 1, even with H2 and O1 you end up with a ratio of 8 to 1, so about 100g hydrogen in weight per kg of water.