Na and K are very reactive metals and kept in kerosene oil to prevent it from coming in contact with oxygen and moisture as they react to form their hydroxides. This is an exothermic reaction and lot of heat is generated so both the metals are kept in kerosene oil.