The specific heat is the amount of heat in joules required to raise 1g of a substance 1 deg Celcius. In this case the temperature rise is 57.9-35.0=22.9 deg C. So that's 22.9 times as much heat as raising by 1 deg C. We need to divide by 22.9. 48.2g is 48.2 times more than 1g so we divide by 48.2. What do we divide? The amount of heat supplied, which is 345j. 345/(48.2*22.9)=0.3126 j per g per deg C.