I was asking about the specific situation described above. There are no "millions of others". There are no other things society has decided to do, or at least to the extent there are they are the same in both cases. The only incremental act to judge the morality of is the one laid out before you. The taking of $40 from Jim to give $20 each to Bob and Ted.
Well, it depends why they took the money and what it's used for. The question makes no sense without the context of why it's being taken.
Say that Jim runs a business in a dangerous neighbourhood. If he gives the money to Bob and Ted, then maybe he doesn't need to worry about some thugs breaking into the place and smashing up all his shit. That would be immoral.
Say that Jim runs a business which uses the local electric grid which is run by Bob and Ted. He used $40 worth of electricity and didn't pay them. In the absence of any law enforcement authority or regulatory body to call upon to handle the situation, they are within their rights to go and take what he owes them.
I didn't realize the answer would depend on the use of the money.
Are you arguing it's OK to point guns at people and take money from them in general so long as the use of the money is good?