To find the correct formula, look at the name of the compound.
Sulfate means it contains a sulfate group (SO4^-2). Because the compound must be charge neutral there has to be an equal number of positive charges to equal the -2 of the sulfate group.
Hydrogen has a charge of +1 and potassium also has a charge of +1 because both are group one elements on the periodic table.
So the correct formula is: KHSO4
To find formula mass, get the mass of each element from your periodic table and multiply that mass by the number of atoms in the formula.
K = 39.098
H = 1.008
S = 32.06
O = 16 * 4 = 64
Total mass = 39.098 + 1.008 + 32.06 + 64 = 136.166