Use the equation:
#q=mcDeltat#
where #q# is energy in Joules (J), #m# is mass, #c# is specific heat capacity, and #Deltat#, which is change in temperature. #Deltat=T_"final"-T_"initial"#
The specific heat capacity of water, #c_"H2O"#, is not given. It is #4.184 "J"/("g"*^@"C")#.
https://water.usgs.gov/edu/heat-capacity.html
Organize your information.
Given
#q="6345 J"#
#c_"H2O"=4.184 "J"/("g"*^@"C")#
#Deltat=("45.1"^@"C"-"22.6"^@"C")="22.5"^@"C"#
Unknown: mass in grams
Solution
Rearrange the equation to isolate #m#. Substitute the given values into the equation and solve.
#m=q/(cDeltat)#
#m=(6345color(red)cancel(color(black)("J")))/(4.184color(red)cancel(color(black)("J"))/("g"*^@color(red)cancel(color(black)("C")))xx22.5^@color(red)cancel(color(black)("C")))="67.4 g H"_2"O"# (rounded to three significant figures)