The 2 links share above give nice information. For a quick response, after you add the third anchor point to the line, with the path tool still selected, hold down option/alt key and click on the anchor point once. Your cursor will look like 2 lines creating a narrow angle.
You can do this before moving the anchor point or after. It will straighten the curves coming to this anchor point.
EDIT: I realize that you don't have a line in your image, its a really thin rectangle you are working with.
For the desired outcome, you will need to add 2 anchor points to long sides up and down, click both of them with option key held down and path tool still selected. Then select both anchor points residing on the long lines, lined up vertically and move them upwards.