Hate to say, think you answered your own question, Unless ones really experienced mechanic, even then I doubt they'd ever use an air gun or nomadic tool on expensive aluminum parts, lesson learned.
Actually I already figured it out . Thanks to “stopintime” for comments. First nut was there to align the whole foot peg holder and spanner nut was there to fix it in place. I’ve hand tightened that spanner nut using elongated pliers. Unfortunately that was all I had in my garage.
Now I’m searching for the spanner wrench to give it a proper torque.
By the way the foot peg holder was absolutely fine after using airgun to unscrew the bolt. The threads fine too and everything seats solid.