SPD PD-M520 Pedals, replacing the Body Cover
I remember doing this last year. You need a way to keep the spring-loaded part (on the left in your pictures) out of the way while you move the other part into the correct position where you can attach the screw. If I remember correctly, I did this by sticking a long screwdriver between the axle and the spring-loaded part and holding it with one hand while using the other hand to position the loose part and putting at least one screw in to hold it.