Voltage regulators in series
No, this won't work. The LM2940 requires a minimum input voltage of 6.25V for a 5V output. So, your wall wart is not providing a high enough voltage. Furthermore, you can't connect the output of one LM2940-5 to the input of another LM2940-5.

You need an ac/dc power supply that provides at least 6.25V. The inputs of both of the LM2940s should be connected to this power supply.