Let x be David's age.

Yuan is seven years older than David, 7 + x = Y years.

Yuan is also twice David's age, 2 * x = Y years.

Since these two equations equal the same thing, we can write: 7 + x = 2 * x.

Subtracting x from both sides we get 7 = x, so David is 7 years old.

# Answer

7
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
Yuan is 7 years older than his brother David and twice his age. How old is David?
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
7
Yuan is 7 years older than his brother David and twice his age. How old is David?
train