This is the next place that the factory instructions may frustrate you. Well, for one thing, they jump to removing the glove box next, which is ridiculous because the under hood part is not done yet. But also, the drawing of how to install the actual hood switch is virtually indecipherable (to me anyway). This will help...
Looking at the front of the hood latch makes it very clear where the one screw goes, but the actual positioning of the switch is as clear as mud.
If you look at the switch, you will notice a tab protruding from both sides. I suspect this switch works on other Mazda models, because the CX-5 only makes use of one of the two tabs. This picture of the backside of the hood latch shows where that tab will go into.
The entire switch sits at a random awkward angle, but when you blindly try to put the switch into the right place, you will feel it when it pops into place. The thin metal switch prong goes towards the fuse panel side of the car, and the wires will go into the groove at the top of the image. Use the provided screw to mount the switch.
Next, you want to clean the metal panel behind the latch thoroughly and then stick on two of the three wire-tie tabs provided in the kit. Run the wire bundle as shown. Make the wire ties snug, but do not over tighten them. Clip off the excess from the wire ties.
Run the wiring bundle under the duct and panel we loosened earlier. Make sure that when everything is fastened down that the wire bundle is not pinched. You should be able to grasp the bundle from each side of the duct and tug it back and forth slightly.
The bundle will come out here, not at the far end of the panel. Clean the area and mount the 3rd wire-tie tab as shown, then tie the wires into place.
This is a picture of everything tucked back in. It should look very clean with only a tiny peek at the wire before the duct, and the bundle will also show over by the hood prop holder.
Run the wiring bundle around the factory wiring harness as shown.
Run the wiring bundle down along the factory harness, using zip ties in a few places to keep it in place.
As you start to come around to the fuse panel, do not zip tie the bundle in yet as this will make it harder to work with the fuse panel connector. Do make a note though to not block the air filter cover from being removed in the future.
I removed both of these connectors to make my life easier, but I only used the connector with a lot of wires, not the one with only three (or more, depending on your fuse panel model) wires.
*** NOTE: This will vary depending on which model of CX-5 you have. The factory instructions clarify this, so please reference them as needed.
Regardless of which fuse panel your car has, the white wire from the hood switch will go into this empty slot I am pointing at. It is behind the red wire in my car, but the red wire may be a different color on yours. Again, refer to the factory instructions here to be sure.
Gently push the wire as far as it will go into the slot without forcing it at all. This will just help set it up for the next steps.
Use a tiny screwdriver or other tool to loosen the retainer clip using the two small slots on this side of the connector. It only needs to be loosened a tiny bit, not removed.
Now push the white wire in until it bottoms out. You may hear a small click, but make sure it is all the way in with no metal showing. Then push the retainer clip back into place; it should take only a small amount of pressure to get the clip back in. If it feels hard, then your wire is probably not in the right position yet.
Now, if you see the black wire shown here, then you have the same fuse panel model that I have (Type A) and this is the black wire that you want to tap into using the provided red 'electro tap'. If you do not see the black wire and that slot is empty, then you have a Type B and you need to refer to the factory instructions for the correct black wire to use from the other connector. Either way, the next steps will be the same, except the black wire you use may vary.
Remove the factory black tape that holds the wires of the two connectors together. Then separate the black wire to make it easier to work with.
Attach the black wire from the hood switch to the factory black wire using the electro-tap. The factory wire goes all the way through on one side, and the hood switch wire goes into the other side, all the way until it stops. Use pliers to push the metal tab in firmly until you can close the plastic flap all the way. It may not stay closed though, so be sure to use black tape to wrap the whole thing up.
You can now put the connectors back in, replace the fuse panel cover (taking care of the new wires) and finish adding zip ties to the wiring bundle as needed in a few places to secure it.