Homer invites himself to Ned Flanders's house for breakfast and finds Ned's beatnik parents there. Flanders begins to feel uneasy when his parents begin to take a liking to Homer rather than him. After a morning jog, Ned comes home to find Homer and his parents smoking "medicinal" marijuana and watching TV. Flanders becomes so enraged he punches Homer in the face, giving him a black eye. Homer is furious at Ned, who does not know what he has to do in order to be excused. Ned eventually finds a solution in the Bible ("an eye for an eye"), and encourages Homer to punch him in order to make them even. However, Homer refuses to punch him, citing that he is the bigger man by not punching Ned and brags about it, causing Ned to punch Homer's other uninjured eye.
Meanwhile, Lisa learns that Ms. Hoover has taken leave due to a bout of severe depression, and the class gets another teacher, Mrs. Cantwell. Cantwell takes a liking to everyone in the class except for Lisa, whom she bullies by giving her below-average grades and taking the paper cutout joeys off the kangaroo-themed "good behavior" board. Homer and Marge try to get Principal Skinner to do something, but the bullying worsens and Lisa is sent to detention, where the bullies are shocked to learn that Cantwell as a teacher is such a bully to a student like Lisa.
Homer eventually finds a solution to Lisa's dilemma and Ned's own: he will accept Ned's apology if his wife Edna Krabappel gives advice on how to get rid of the bullying teacher. Edna says the only way is the "nuclear option" - which means putting Bart in Cantwell's class. When Cantwell leaves to go to the bathroom, Bart brings chaos to the classroom and then shows Cantwell a compromising video of herself in the bathroom cursing Lisa and tells her he posted it online. The plan works in getting Cantwell to leave, but it does not get Cantwell to be nice to Lisa. When Lisa tries to catch up to Cantwell before she drives off, Cantwell admits that she was only jealous because Lisa is pretty, and that pretty girls like Lisa have it easier than girls like Cantwell, who have to use their brains to get by in life. This is an idea that Lisa happily accepts — even after Cantwell splatters mud on her as she drives off.
The story ends with Homer having a barbecue with Ned and his parents, and Ned's father revealing to Marge that he got Homer and Ned to be nice to each other by slipping marijuana in their food.