Solving for slant height in a square pyramid