Tom turned 32 years old 5 years ago.  7 years ago Jim was 5 years older than half Tom's age.  How old is Jim in 2 years?
Tom is 32+5=
<gadget id="calculator">32+5</gadget>
<output>37</output>
37 years old.
So 7 years ago he was 37-7=
<gadget id="calculator">37-7</gadget>
<output>30</output>
30 years old.
Half of his age was 30/2=
<gadget id="calculator">30/2</gadget>
<output>15</output>
15 years old.
So 7 years ago Jim was 15+5=20.
So he is now 20+7=
<gadget id="calculator">20+7</gadget>
<output>27</output>
27 years old.
That means in 2 years he will be 27+2=
<gadget id="calculator">27+2</gadget>
<output>29</output>
29 years old.

<result>29</result>