I assume this is a new CX platform car as per the forum used.
I haven't looked at the new hood mechanism on the CX cars but assume the front is fixed with two catches, one either side (if not then can someone please tell me). Can you fix the hood to the front with each catch but just so they are together, not locked into their final position? If so then do this, then push down on the rear hood hoop to lock into the car body. Tighten the front catches and job done.
If the rear is still not locking down then the problem could be the rear mechanism. As said, I haven't looked at a CX car but am assuming the rear hood locking mechanism is the same as the later Trads. If the same then it could be a snapped cable.