This is the first step. The above drawing is segment AB with endpoints A and B.
Rotating segment AB clockwise to 90 degrees around B would bring the segment standing above B. In this case, we have a new segment A'B.
Using the polygon tool means connecting the three points to form an enclosed shape, we have:
We have a triangle ABA'.