I have used cans of window/door expanding foam for this and also the kits made for it, which definitely worked better. I did about 15 sets of 30 year old steps that looked just like yours but about twice as big with one of the kits, worked great. With the kits you would normally drill a bunch of holes and slowly work it up. With cheap can foam I would jack the whole thing up higher than you want, shoot the foam in from the side, and slowly drop it down as the foam expands to fill the space. The cans are not as predictable.
I would knock that lip off the top step before doing anything and then patch it afterwards to make it easier to get level.
Because its not very big I would be tempted to jack it up and pack 5/8"- or equivalent "packing gravel" under it, I have also done that to fix steps. Or move it and make a nice base, or just replace it because its so small.