One of these is a Sukhoi Su-17M-3, the other an Su17B. The M3 being a slightly beefed up version with laser rangefinders and more fuel capacity. The B was likely just the basic version, codenamed 'Fitter' by NATO.