Jame will turn 27 in 5 years.  In 8 years his cousin will be 5 years younger than twice his age.  How many years separate the age of the two now?
James is 27-5=
<gadget id="calculator">27-5</gadget>
<output>22</output>
22 years old.
In 8 years he will be 22+8=
<gadget id="calculator">22+8</gadget>
<output>30</output>
30 years old.
So in 8 years, his cousin will be 30*2-5=
<gadget id="calculator">30*2-5</gadget>
<output>55</output>
55.
So his cousin is 55-8=
<gadget id="calculator">55-8</gadget>
<output>47</output>
47 years old now.
So there is a 47-22=
<gadget id="calculator">47-22</gadget>
<output>25</output>
25 year gap.

<result>25</result>