How is that not a happy ending? Teacher is ex boyfriend, osananajimi is new boyfriend - happy ending.
Ok, there was a bit of an overlap spoiling things a little, but it's over now, and was also the reason the two managed to hook up in the first place which kinda redeems the negative aspect.