Let x be the number of apples in Box B. The number of apples in box A is equal to x+125. After transferring 1/5 of the apples from A to B will give us the equation of,
((x)+(1/5)(x+125) - (4/5)(x+125) = 15
The value of x from the equation is 225. Therefore, the number of apples in Box A and B are 350 and 225, respectively.