This is a The SpongeBob Chronicles episode.
After getting mad about a sunburn, Larry gets a boating ticket. Mrs. Puff has a hard time teaching because Larry keeps bragging about himself. She has no other choice but to send Larry out. Mr. Fitz (Remember him from "Mrs. Puff, You're Fired") sends Larry to Sergeant Roderick (Remember him from "Mrs. Puff, You're Fired") which Roderick hates, because he knows that Larry knows SpongeBob. But now, Roderick has a clean hairdo and is trying to be nicer. Larry messes up everything, causing Roderick to break out in anger.