I have independent random variables $X_1$ and $X_2$ such that
$ X_1\sim Bin(n_1, 1/2) $ and $X_2\sim Bin(n_2,1/2)$ be independent random variables . Find the distribution of $Y = X_1-X_2+n_2$
Attempt : $$ P[Y = X_1-X_2+n_2 ] = \binom{n_2}{x_1-x_2+n_2}*(1/2)^{x_1-x_2+n_2} *(1/2)^{x_1-x_2} \\ = \binom{n_2}{x_1-x_2+n_2} (1/2)^{n_2} $$
Is this right ? It seems wrong since answer is independent of $n_1$ and I hadn't used the fact that both are independent random variables .
Your calculations are indeed wrong in any case. Here is a much simpler method. $\newcommand{bin}{\operatorname{binom}}$
By comparing pmfs – the expanded pmf of $X_2$ is $P(X_2=k)=\binom{n_2}k\left(\frac12\right)^{n_2}$, while we have the identity $\binom nk=\binom n{n-k}$ – we see that $$n_2-X_2\sim X_2\sim\bin\left(n_2,\frac12\right)$$ Therefore $$Y\sim X_1+X_2\sim \bin\left(n_1+n_2,\frac12\right)$$