Back to the origin of this thread - the onset of whatever happened here was so rapid that it’s unlikely anyone would have been able to offer advice by radio.
As for the legality or otherwise of handheld radios in aviation, should an emergency occur and the best means of communication not be ‘approved’ for the purpose, it matters not. But a student flying solo shouldn’t know that the instructor is eavesdropping on the radio.