Petes edge Knights, punch ticket to Memorial Cup