The above is correct. The gasket that goes on the lip of the cowl panel can also keep the hood popped up in the back so check that too.
Your gap at the back of the hood is too large, probably leading to the overhang in the front. Slide the hood back on the hinge. I like to wad a towel up under the rear hood corner when open as a precaution. Use masking tape to make an outline of two sides of the hinge on the hood and use them as a guideline to move the hinge forward relative to the hood by the desired amount.