I have the SKS Commuter mudguards on my Specialized, they came with all the bolts, and the frame should have the threaded lugs on the fork dropouts and rear dropouts to attach the "supports" to.
Can't remember the size of bolts, but maybe something like M6x20? (will have to check).
Your forks should also have a "hole" in them just below the fork crown race, this is used as another anchor point for the mudguards, min ehas a nut & botlt fitted to secure the mudguard mount.
Also the rear seatstay bridge hould have the same "hole" to receive a nut & bolt to support the rear mudguard (my Spesh didn't, I had to drill one myself).
My commuter mudguards have a clip which attaches to the chainstay bridge as another support.
With the rack, unless you have 2 lugs/eyelets on the rear dropouts (some frames do) then you'll have to try and use the same fixing point as the mudguards. You should be able to adjust the height of the rack so that it clears the top of the rear mudguard. It should also be secured at the seatstay bridge.
Clear as mud?
it may be the case that you don't have all the required parts? like trying to solve a jigsaw when there's several parts missing...
Oh, and I can reccommend the SKS "Spoiler Pro" or "Spoiler xl" as a good way of providing even better crud protection