Pipes A and B can fill an empty tank in 30 minutes and 40 minutes, respectively. Both pipes are opened for x minutes and then B is closed and A continues to fill. If the tank was completely filled in a total time of \(22\frac{1}{2}\) minutes, then what is the value of 'x'?
1
12
2
8
3
9
4
10