First picture is a hip flexor stretch; arching the spine backwards provides for a negative hip angle resulting in the psoas muscle stretch. The psoas can be a culprit in lower back pain.
Second picture is a quad stretch; lying on the floor keeps a neutral hip angle resulting in an isolated quads stretch. Use a strap or belt at home or the gym to pull if you can’t reach your foot with your hand.