If they were sharing the water they could have just both gotten sick.. Frogs are just as sensitive as fish with water quality, the same if you had two bettas in a divided tank and one got sick! I'm sorry you had trouble with them... If they were from a petstore it's very possible they were already ill, I never advise anyone to get any reptile or amphibian from petstores--they look healthy to the untrained eye but man, a lot of times these guys are treated as bad or worse than bettas! (Gross to see 10 iguanas in a 5 gallon container..with 7 of them dead :( )
I'm really sorry for both losses, I don't think any of it was your fault, it just wasn't meant to be for now..
I personally have never tried ADFs because it's harder for me to see their health than a frog I can actually inspect..If you ever want another frog, I suggest you try a pacman frog or a white's tree frog! Both are some of the easiest pets you can imagine, and can easily live over 10 years given the right care (But the pacman frog will get HUGE eventually!)