Ok i think i know how to explain it to you.
when you first learned the pythagoras theorem, the teacher probably drew a right triangle on the board. The teacher then marked the right angle with the letter 'B' and said that (AB)2+(BC)2=(AC)2.
The teacher was right. But you forgot something. You dont have to mark the right angle with 'B'. The teacher coulve marked it with 'C'. That means instead of (AB)2+(BC)2=(AC)2 the theorem would've been (BC)2+(AC)2=(AB)2. You dont need to mark something with a specific letter for it to work.
what you did wrong is you marked a specific angle with B and thought it means B is the right angle! but thats wrong, because 'A' is the right angle!.
also, in my first post i wrote:
You simply wrote 'B' instead of 'A', 'C' instead of 'B' and 'A' instead of 'C'.
I was wrong, i dont know if it helps you but you wrote 'A' instead of 'B', 'B' instead of 'C' and 'C' instead of 'A'.
hope it helps!