Original A: B =5:8= 15:24
Current A: B = 1:2= 13:26.
Because the total number of people remains the same, we can see the change of the proportion of people after the transfer of 8 people from Team A and Team B by replacing the two proportions with the same total number of shares.
8/( 15- 13)=4 (person)
One "share" is four people.
Answer: 4* 13=52 (person)
B: 4*26= 104 (person)
This is the current number.
I hope this helps.