This question already has an answer here:
Read this as a kid in the early 80s.
Two boys in our world get in a fight at school, but when they enter the principal's office they are transported to a parallel world. As I recall, they had to work together to save that world by finding several magic items (one was a thread, I think?). And in that world math and poetry were magic?
Anyone remember this?