I think you have the order of transition wrong. So in the first image (L.H.), you'd play the high F (assuming bass clef) with your thumb (1), then the D with the index finger (2). You'd then continue holding down the D with your thumb (2), which allows you to reach down to the C (with your pinkie). So you're transitioning from finger 2 to 1 (not from 1 to 2 as you have written).
Similarly, in the second image (R.H.), you'd play the first numbered pair of notes with your thumb and index finger (1,2) then replace your index finger with your middle finger -- which allows you to use your second finger to play the G-double-sharp. My first inclination would be to just directly play the B with the middle finger, but presumably you can't do this because your middle finger is still holding down the high D. Or else I'd keep the 2 on the B, and lift the thumb to use it on the G-double-sharp. But both of these cases involve ending a note prematurely, while the indicated fingering prevents this.
For the second pair of numbered notes in the second image, you start playing with fingers four and two, then replace those with fingers five and three. This allows you to hold the notes while reaching for the low C with the thumb.
In each case, the goal of shuffling the fingers around like that is to achieve a connected legato sound, without any breaks between the notes, and without using the sustain pedal.