Concept:Translate the card conditions into linear equations and solve them by substitution.Explanation:Let the initial cards with A, B, C and D be A, B, C and D respectively.If A gives 8 cards to B, then B has B+8 and A has A−8.Given: B+8=C and A−8=C−3.From A−8=C−3, we get C=A−5.Substitute C=A−5 into B+8=C to get B+8=A−5.So, B=A−13.If A takes 6 cards from C, then A has A+6.Given: A+6=2D.Also, B+D=50.Substitute B=A−13 into B+D=50 to get (A−13)+D=50.Thus, D=63−A.Put D=63−A into A+6=2D: A+6=2(63−A).So, A+6=126−2A, which gives 3A=120.Hence, A=40.Answer:A has 40 cards.Correct option: D. 40.