Here's how you can approach this problem.
A compound's empirical formula tells you the ratio that exists between the atoms that make up said compound.
The thing to remember here is that the number of atoms of a certain element that appears in the empirical formula must be an integer.
The idea here is that the mpirical formula tells you the minimum number of atoms of each element needed to satisfy that ratio.
On the other hand, a compound's molecular formula tells you exactly how many atoms of each type are needed to form one molecule of a substance.
In water's case, you know for a fact that
To prove that this is also the molecular formula, you can use water's molar mass. A compound's molar mass tells you what the mass of one mole of a substance is.
So, the molar mass of water is
This can be written like this
#(2 * M_("M hydrogen") + M_"M oxygen") * color(blue)(n) = "18.015 g/mol"#
The molar masses of hydrogen and oxygen are
#(2 * 1.008 + 15.999)color(red)(cancel(color(black)("g/mol"))) * color(blue)(n) = 18.015color(red)(cancel(color(black)("g/mol")))#
#18.015 * color(blue)(n) = 18.015 implies color(blue)(n) = 1#
This means that the empirical formula and the molecular formula of water are one and the same,