It looks straightforward to me. Initially, there is "SL" in the numerator while after the "operation" there is "S/RC". So the "S" is left alone and we have divided the numerator by 1/LRC. Dividing the denominator by that same 1/LRC gives (RLS^2+ LS+ R)/RLC= S^2/C+ S/RC+ 1/LC, almost what you have. Either your teacher accidently dropped the "C" dividing S^2 or there is some physical reason (you don't say, but I would guess this is an "LRC circuit equation) why that can be done although it does not look likely.
You guys are right, I miscopied! It's RLCS^2 and not RLC^2 at the denominator of the first expression..oops. Thank you, though, because saying what mathmatical operation he did cleared it out for me :-) I re-solved it and got the same answer he did!