In according to law of definite proportion in a pure compound the elements are always present in the simple fixed ratio by mass. So irrespect of mass of water the ratio of hydrogen and oxygen should be 1:8
Hence in 10g of water we will get 10 x 1/9 = 1.11g of hydrogen
and 10x 8/9= 8.89g of oxygen.