Do suttas represent four different classifications that there are four types of different mendicants with five qualities.
Or are these suttas explaining development process if a mendicant has five qualities then first practising for 1) his own welfare, 2) welfare to others 3) neither for their own welfare, nor that of others, and then 4) both their own welfare and that of others.
That I’d like to take a moment to appreciate the many individuals who have progressed far enough to think not only of their own liberation, but also to leave trail markers for those who follow. The “In the Buddhas words” reading guide is only one example of where I have benefitted from the time/effort invested by others.
“Monks, the establishing of mindfulness is to be practiced with the thought, ‘I’ll watch after myself.’ The establishing of mindfulness is to be practiced with the thought, ‘I’ll watch after others.’ When watching after yourself, you watch after others. When watching after others, you watch after yourself.”—SN 47.19
By observing mindfulness you look after yourself and others simultaneously just as acrobats concentrate on their own task. This also communicates that life is an art-form requiring skill, that’s why it’s wise to limit outside involvement and only deal with what you can process dhamma-wise. This is the balance referred to between the mind being ‘constricted’ (lack of energy) and ‘scattered’ (outwardly) in the Satipatthana sutta. Being preoccupied with other people’s business does not help yourself or them, it could be disastrous.
I think AN 5.17-20 probably should be read as a single text like AN 4.96, as @faujidoc1 has indicated. It’s a case of the four alternatives being applied with different example qualities that represent proper cultivation. The distinctions of people who are concerned with only themselves or both themselves and others (the latter being considered superior) is found in other suttas like AN 7.68. Here, two more alternatives are added to the same idea.
It is taking 4 different categories of mendicants (each mendicant having the same 5 qualities otherwise) and arranging them from less skillful to more skillful based on their practice so that the reader can see where they are, and what they should aim for.