Finding the height of a square pyramid