Answer:
---------------------------
Let the number of green files be x.
Tan had 40 more yellow files than green files, which means he had x + 40 yellow files.
After selling 20 yellow and green files, Tan had x - 20 green files and (x + 40) - 20 yellow files.
We also know that after selling 20 files, there were twice as many yellow files as green files left.
So we can set up the equation:
- 2(x - 20) = (x + 40) - 20
Simplifying this equation: