6. (5 points) In a store, there are three baskets of apples, A, B, and C. The number of apples in basket C is twice the number of apples in basket A. If 12 apples are taken from basket B and put into basket A, then at this point, basket A has 24 fewer apples than basket C, and basket B has 6 more apples than basket C. How many apples were originally in basket B? $\qquad$