In theory, the derailleur is clamped into the dropout by the silver stepped nut, with the flat towards the axle.
In practice they don't really work, and the axle nut is what holds everything together - until you take the wheel off. The blue is probably threadlocker, to try and get round the looseness. These and other similar designs (a tapped hole at the dropout instead of the nut) often strip the thread on that little nut or its screw, because the holding force you want is more than you get.
I never bothered actually solving it, and on the bike I had that did this, just relied on putting the derailleur back onto the axle whenever I had the wheel off. I ran a tyre liner and a fairly thick tyre and tube, so didn't get many punctures on my short urban rides.
My commuting toolkit would deal with this: a pair of spanners for the axle nuts, a smaller spanner (probably 10mm) for the hex head on that little bolt (a screwdriver fits but doesn't give enough torque), and disposable gloves as you'll get filthy. I suggest slotting the wheel in with the axle nut as loose as it will go without falling off.