Potential Energy = Mass x Gravitational Constant x height = mgh
6 = m(9.81)(3)
Divide both sides by 9.81 and 3 to get m alone.
6 / (9.81 x 3) = 0.204
Also, don't forget units! I'm not sure what your units are for the mass because you didn't give units for Potential Energy.