OK, you need to get a letter from your employer stating your last day of employment, go to immigration and cancel your current extension of stay, (this can be done in advance), you should also cancel your work permit, (but you say your school will do that). Then leave the country and apply for a new Non-B based on teaching.
PS Yes you need to go to the same office that issued your extension to cancel it.