When a certain biased coin is flipped five times, the [probability](https://artofproblemsolving.com/wiki/index.php/Probability) of getting heads exactly once is not equal to $0$ and is the same as that of getting heads exactly twice. Let $\frac ij$, in lowest terms, be the probability that the coin comes up heads in exactly $3$ out of $5$ flips. Find $i+j$.
Solution 1
Denote the probability of getting a heads in one flip of the biased coin as $h$. Based upon the problem, note that ${5\choose1}(h)^1(1-h)^4 = {5\choose2}(h)^2(1-h)^3$. After canceling out terms, we get $1 - h = 2h$, so $h = \frac{1}{3}$. The answer we are looking for is ${5\choose3}(h)^3(1-h)^2 = 10\left(\frac{1}{3}\right)^3\left(\frac{2}{3}\right)^2 = \frac{40}{243}$, so $i+j=40+243=\boxed{283}$.


Solution 2
Denote the probability of getting a heads in one flip of the biased coins as $h$ and the probability of getting a tails as $t$. Based upon the problem, note that ${5\choose1}(h)^1(t)^4 = {5\choose2}(h)^2(t)^3$. After cancelling out terms, we end up with $t = 2h$. To find the probability getting $3$ heads, we need to find ${5\choose3}\dfrac{(h)^3(t)^2}{(h + t)^5} =10\cdot\dfrac{(h)^3(2h)^2}{(h + 2h)^5}$ (recall that $h$ cannot be $0$). The result after simplifying is $\frac{40}{243}$, so $i + j = 40 + 243 = \boxed{283}$.