honey... I don't even own a cockatiel yet, but I already see big mistakes. For one, the cage is too small. I recommend a cage that size for 2 finches, maybe not even that. Also, here is your BIGGEST mistake, if you didn't do this : quarantining your birds. At the shop, a cockatiel might have a disease or sickness the owners have not yet told you about, and that is why when you plan on getting a 2nd bird, you must quarantine them. This explains how your other cockatiel got diarrhea, too. Also, the water bottle. Water bottles can collect bacteria from the air and moisture collecting inside of it, and that may be a problem that both are experiencing. I am afraid that your only option here is to take them to the vet. If you don't, but not to guilt you, they could die an agonizing death.
Best wishes from me.
Best wishes from me.