If Neo had killed either of the other two agents instead of Agent Smith, would the killed agent have become the "Smith"-like virus as well?
I think there are at least some hints Smith was unusual before he became a virus. In the scene of Morpheus' interrogation, at one point Smith says "Leave me with him. Now." The other two agents give him an odd look before leaving, as if this is an unusual request. Then once they are out of the room, he removes both his sunglasses and his earpiece and says:
Can you hear me, Morpheus? I'm going to be honest with you. I hate this place, this zoo, this prison, this reality, whatever you want to call it. I can't stand it any longer. It's the smell, if there is such a thing. I feel saturated by it. I can taste your stink. And every time I do I feel I have somehow been infected by it. It's repulsive, isn't it? I must get out of here. I must get free and in this mind is the key, my key. Once Zion is destroyed there is no need for me to be here, don't you understand? I need the codes. I have to get inside Zion, and you have to tell me how. You're going to tell me or you're going to die.
So it seems he was highly motivated not just to do his job, but to find a way of destroying Zion so he could stop doing his job and leave the Matrix, which seems unusual for a program. And the fact that he ordered the other agents to leave and removed his earpiece (which seems to connect them to each other and to whatever other programs give them orders) before giving this speech suggests that he didn't want any of the other programs to know about these desires of his.
The removal of the earpiece is also important because at the start of Reloaded, he appears at the door of the rebel hideout and passes a package to the doorman, "Corrupt":
Smith: I'm looking for Neo.
Corrupt: Never heard of him.
Smith: I have something for him. A gift. You see, he set me free.
Then when Neo opens the package, he sees it's Smith's earpiece, which he no longer wears in Reloaded and Revolutions. So the fact that he associated the loss of his earpiece with being set free, combined with the fact that he removed it in the interrogation scene before he was transformed into a virus, suggests he already had an unusual desire to be free of his assigned role in the first film.
So while I don't know if another agent would have gained special powers from Neo destroying them in the same manner as Smith was destroyed in the first film, even if they did, I don't think another agent would have used these powers in an attempt to destroy the Matrix by copying themselves into everyone else inside it (a 'virus'-like strategy that may have been inspired by his notion that humanity was a kind of virus, something he talked about in another section of the interrogation scene with Morpheus).
As for the question of why Smith gained these new powers, I think all we really know is what was said in this exchange from Reloaded:
Smith: Then you're aware of it.
Neo: Of what?
Smith: Our connection. I don't fully understand how it happened. Perhaps some part of you imprinted onto me, something overwritten or copied. That is at this point irrelevant, what matters is that whatever happened, happened for a reason.
Neo: And what reason is that?
Smith: I killed you, Mister Anderson, I watched you die... With a certain satisfaction, I might add, and then something happened. Something that I knew was impossible, but it happened anyway. You destroyed me, Mister Anderson. Afterward, I knew the rules, I understood what I was supposed to do but I didn't. I couldn't. I was compelled to stay, compelled to disobey. And now here I stand because of you, Mister Anderson, because of you I'm no longer an agent of the system, because of you I've changed - I'm unplugged - a new man, so to speak, like you, apparently free.
The line "I don't fully understand how it happened. Perhaps some part of you imprinted onto me, something overwritten or copied" probably suggests the Wachowskis didn't really want to get into the specific technical details of why the transformation happened on a technical level.
Short answer: We don't know if Agent Brown or Jones would have become a virus like Smith, but it's possible.
How did Smith become a virus?
Ultimately, we don't know because we don't know exactly how Agent Smith was transformed into a virus. The list of machines that might know is small:
- The Architect
- The Oracle
- Deus Ex Machina
- The Merovingian
Neither the Architect nor the Merovingian say anything about the Smith virus (the former is too concerned with The One, and the latter with the Oracle). Deus Ex Machina talks about the Smith virus with Neo, but haughtily declares that the Machines don't need Neo's help to deal with the Smith virus.
Smith himself doesn't know exactly how it happened, although he provides us with a plausible guess:
Our connection... I don't fully understand how it happened, perhaps some part of you imprinted on to me, something overwritten or copied, but it is at this point irrelevant; what matters is that whatever happened, happened for a reason.1
Smith guesses that some of the code Neo carries as part of his function of The One was copied onto him, making him no longer an Agent and giving him new abilities.
The Oracle gives us the best information about what Smith is, and therefore how he became a virus:
Neo: What is [Smith]?
Oracle: He is you. Your opposite, your negative, the result of the equation trying to balance itself out.2
The Oracle's information seems to agree with Smith's guess that part of Neo's code copied onto him, presumably as part of the system trying to balance itself out against Neo.3 It is worth noting that Smith's ability to copy himself is similar to an Agent's ability to possess blue-pills -- whereas Agents can possess one body at a time and move in and out of it, Smith can possess multiple bodies at a time but does not leave them. Smith's viral ability is something of a corruption of a normal Agent's possession ability.
Would a different Agent become a virus?
Agent Smith was notably different from other Agents in that he displayed an unusually heightened hatred and loathing of humans. At least, that's the impression we get from his interrogation of Morpheus in The Matrix (although that might have been just part of his interrogation techniques).
However, assuming Neo destroyed Agent Brown or Jones in the exact same way he destroyed Agent Smith (so that part of Neo's code was copied onto the destroyed Agent), it's still likely the destroyed Agent would have chosen exile and become a virus just like Smith. That's because Smith tells us he was compelled to choose exile instead of deletion because he still had purpose. That purpose is the same as any other Agent, which is to remove all anomalies from the system (whether red-pills or exile programs). Agent Brown or Jones would be similarly compelled to choose exile instead of deletion and would ravage the Matrix as a virus just like Smith (although perhaps with a bit less personal hatred toward humans). Although we don't see Agents Brown and Jones in the sequels, they were still working for the machines as of the events of The Matrix Online, so they clearly still had a purpose despite the existence of the upgraded Agents Johnson, Jackson, and Thompson.
In summary: We don't know exactly how Smith became a virus, but the best evidence we have is that it was caused by the system trying to balance out The One. The system did this by modifying the Agent's normal possession ability. Assuming the system would do the same thing with a different Agent, that Agent would be compelled to choose to become an exile virus (rather than be deleted) because he would still have his purpose (to remove anomalies from the system).
1 The Matrix Reloaded
2 The Matrix Revolutions
3 This does not imply the Smith virus is inevitable in every cycle of the Matrix. Perhaps previous Ones never destroyed an Agent in the same way, so no other Agent has become a virus. Destruction of Agents (so that they are flagged for deletion) is extremely difficult since they can simply leave a body that has been killed.