If a withdraws 240 yuan and B withdraws 40 yuan, then the deposits of AB and ab are exactly the same. How many yuan did AB and ab deposit?

If a withdraws 240 yuan and B withdraws 40 yuan, then the deposits of AB and ab are exactly the same. How many yuan did AB and ab deposit?

one
Set B deposit X Yuan
3X-240=X-40
3X-X =240-40
2X =200
X =100
100×3=300
two
(240-40)÷(3-1)=100
100×3=300
A
I'll take mine in two ways