Call the tanks A and B. Originally A=B. Say the water was pumped from A to B.
That means subtract 3000 liters from A (A-3000) and add 3000 liters to B (B+3000). B+3000 is 6 times A-3000.
6(A-3000) = B+3000 ---> 6A - 18000 = B + 3000.
Remember, that A = B. So substitute B into the equation for A.
6B - 18000 = B + 3000
5B = 21000
B = 21000/5 = 4200 = A.
Both tanks originally held 4200 liters. After 3000 liters were pumped from A to B:
A held 1200 and B held 7200. 6*1200 = 7200