Suppose that $X\sim bin(m, \pi)$ and $Y\sim bin(n, \pi)$ such that $X$, $Y$ are independient. Let $Z=X+Y$. Find the distribution of $X$ conditional on the value of $Z$.
It is not difficult to prove that, $Z\sim bin(m+n, \pi)$. Now I need to find $P(X|Z)$. I was thinking of using Bayes' theorem, but I didn't come up with anything concrete, because I don't know $P(Z|X)$. Any ideas or help in particular?
You have the right idea; you just have to follow through.
$$\Pr[X = x \mid Z = z] = \frac{\Pr[Z = z \mid X = x]\Pr[X = x]}{\Pr[Z = z]}. \tag{1}$$
You already know $\Pr[X = x]$ and $\Pr[Z = z]$. All you need now is $\Pr[Z = z \mid X = x]$. But what does this mean? It is the conditional probability that $Z = z$ given $X = x$. And you know $Z = X+Y$, so $$\Pr[Z = z \mid X = x] = \Pr[X+Y = z \mid X = x] = \Pr[x + Y = z] = \Pr[Y = z-x]. \tag{2}$$ The idea expressed in $(2)$ is that once the value of $X$ is fixed, the conditional distribution of $Z$ is just a location-transformed version of $Y$. It has the same distribution as $Y$ except it has had $x$ added to it. Putting $(1)$ and $(2)$ together, $$\begin{align} \Pr[X = x \mid Z = z] &= \frac{\Pr[Y = z-x] \Pr[X = x]}{\Pr[Z = z]} \\ &= \frac{\binom{n}{z-x} \pi^{z-x} (1-\pi)^{n-(z-x)} \binom{m}{x} \pi^x (1-\pi)^{m-x}}{\binom{m+n}{z} \pi^z (1-\pi)^{m+n-z}}. \tag{3} \end{align}$$ Be careful: note that this conditional probability only makes sense when $0 \le x \le m$ and $x \le z \le x+n$.
I leave the remainder of the computation to you as an exercise. What is the resulting distribution? Does it have a name? In light of this result, can you come up with a combinatorial interpretation for why $\Pr[X \mid Z]$ has such a distribution?