Though it could be elementary for people who know information theory, its worth nontrivial question for others. So I would like to provide an answer.
What you have here is a binary erasure channel. Its capacity is $1-b$. By Shannon's channel coding theorem, so long as $(h+d)< c(1-b)$, we can send the file with error as small as we wish. That is, $d< c(1-b)-h$.
For the first part, it is should be $(1-b)^{h+d}$.1-(1-b)^{h+d}$.

