$1$. We first find the probability of $b$ heads in $n$ trials given that there were $a$ heads in the first $m$ trials. By independence, this is just the probability of exactly $b-a$ heads in $n-m$ trials. That is a standard calculation: the probability of $c$ heads in $t$ trials is $\binom{t}{c}p^c(1-p)^{t-c}$.
$2$. We now find the probability of $b$ heads in $n$ trials given that the number of successes in the first $m$ trials is not $a$. This is more complicated, but doable.
Let $B$ be the event we get $b$ heads in $n$ trials, and let $A$ be the event we get $a$ heads in the first $m$ trials. Then
$$B= (B\cap A)\cup (B\cap A^c),$$
where $A^c$ is the complement of $A$. This is a disjoint union. Thus $\Pr(B\cap A^c)=\Pr(B)-\Pr(B\cap A)$.
We can give simple explicit expressions for $\Pr(B)$ and $\Pr(B\cap A)$. So we can compute $\Pr(B\cap A^c)$.
But
$$\Pr(B|A^c)=\frac{\Pr(B\cap A^c)}{\Pr(A^c)}.$$
Finally, $\Pr(A^c)$ can be computed, it is $1-\Pr(A)$. Now put the pieces together. We get
$$\Pr(B|A^c)=\frac{\Pr(B)-\Pr(B\cap A)}{1-\Pr(A)}.$$
All of the quantities on the right-hand side can be written down explicitly, using the standard Binomial distribution probabilities.