Case 1:
When one white ball is transferred from urn A, then the probability of same number of white and black balls in urn A will be,
P1= nC1 2n+1C1⋅ n+2C2 2n+2C2
Case 2:
When one black ball is transferred from urn A, then the probability of same number of white and black balls in urn A will be,
P2= n+1C1 2n+1C1⋅ n+1C1 n+1C1 2n+2C2
So, P1+P2=1325
⇒29n2−46n−24=0⇒(n−2)(29n+12)=0
As n is an integer, so n=2
Hence, the number of balls in the urn A before the operation begins was 5.