Copyright © University of Cambridge. All rights reserved.
Pythagoras' theorem plays a part and you might like to rotate the square through $90$ degrees about $B$.