$X$ is a random variable that follows a binomial distribution with parameters $n, p_1$.
$Y$ is a random variable that follows a binomial distribution with parameters $n, p_2$.
I do not know whether the two variables are dependent or not.
How do I find
$$P(X=x|Y=y)=\frac{P(X = x \bigcap Y=y)}{P(Y=y)}$$
We have : $P(Y=y)= {n \choose y} p^y (1-p)^{n-y}$
But I don't know how to proceed from there.
Unfortunately it's not so easy: you need to know joint distribution unless rvs are independent, in which case you can just take the product of distributions. If they are not, it is found by taking marginalizing out the distribution of the second rv: $$ f_{X\mid Y}(x\mid y) = \frac{f_{X,Y}(x,y)}{f(y)} = \frac{f_{X,Y}(x,y)}{\int_A f_{X,Y}(x,y) dy} $$