3 years ago, paula was 3 times as old as karl. in 9 years, paula will be twice as old as karl. what is the sum of their ages now? Options:
A) 42 B) 46 C) 50 D) 54 E) 58
<gadget id="calculator">9 * 2</gadget>
<output>18</output>

<gadget id="calculator">9 - 18</gadget>
<output>-9</output>

<gadget id="calculator">-(-9)</gadget>
<output>9</output>

<gadget id="calculator">3 * 3</gadget>
<output>9</output>

<gadget id="calculator">9 - 3</gadget>
<output>6</output>

<gadget id="calculator">9 + 6</gadget>
<output>15</output>

<gadget id="calculator">15 * 3</gadget>
<output>45</output>

<gadget id="calculator">45 - 6</gadget>
<output>39</output>

<gadget id="calculator">39 + 15</gadget>
<output>54</output>

<result>D</result>
3 years ago, paula was 3 times as old as karl. in 9 years, paula will be twice as old as karl. what is the sum of their ages now?
add(subtract(multiply(add(negate(subtract(9, multiply(9, const_2))), subtract(multiply(3, 3), 3)), 3), subtract(multiply(3, 3), 3)), add(negate(subtract(9, multiply(9, const_2))), subtract(multiply(3, 3), 3)))
"p - 3 = 3 ( k - 3 ) and so p = 3 k - 6 p + 9 = 2 ( k + 9 ) ( 3 k - 6 ) + 9 = 2 k + 18 k = 15 p = 39 p + k = 54 the answer is d ."