Answer: B.

Explanation:
Given: The total number of cards John and Alan has = x
The number of cards John has =

Then to find the number of cards Alan has, we need to subtract the number of cards John has from the total number of cards.
Then, the number of cards John has =

⇒ The number of cards John has =

⇒ The number of cards John has =
