We throw a biased coin (probability for heads is $\frac{1}{n}$) $m$ times. It is known that in first two throws we got at least one tail. Calculate the probability that we got $k$ heads.
So, let's define:
$A - $ at least one tail in two first throws
$B \ - $ $k$ heads
I need to calculate $\mathbb P(B|A)=\frac{\mathbb P(B\cap A)}{\mathbb P(A)}$, so:
$\mathbb P(A)= 1-\mathbb P($first are two heads$ )=1-(\frac{1}{n})^2$
$\mathbb P(B|A)=\mathbb P(B\cap A)= \frac{1}{n}\cdot\frac{n-1}{n}{m-2 \choose k-1}(\frac{1}{n})^{k-1}(1-\frac{1}{n})^{m-k-1}+\frac{n-1}{n}\cdot\frac{1}{n}{m-2 \choose k-1}(\frac{1}{n})^{k-1}(1-\frac{1}{n})^{m-k-1}+\frac{n-1}{n}\cdot\frac{n-1}{n}{m-2 \choose k}(\frac{1}{n})^k(1-\frac{1}{n})^{m-k-2}$
Am I correct?
No, you have $P(A)=P(\text{there are $k$ heads})$ and this is not true. I would argue that $P(A)=1-P(\text{first two are heads})=1-(\frac{1}{n})^2.$
So you will hve $$P(B|A)=\frac{P(A\cap B)}{P(A)}=\frac{P(A\cap B)}{1-(\frac{1}{n})^2},$$ your computation of $P(A\cap B)$ seems correct to me.