Problem: tom , working alone , can paint a room in 16 hours . peter and john , working independently , can paint the same room in 8 hours and 4 hours , respectively . tom starts painting the room and works on his own for two hour . he is then joined by peter and they work together for two hour . finally , john joins them and the three of them work together to finish the room , each one working at his respective rate . what fraction of the whole job was done by peter ?
Rationale: "let the time when all three were working together be t hours . then : tom worked for t + 4 hour and has done 1 / 16 * ( t + 4 ) part of the job ; peter worked for t + 2 hour and has done 1 / 8 * ( t + 2 ) part of the job ; john worked for t hours and has done 1 / 4 * t part of the job : 1 / 16 * ( t + 4 ) + 1 / 8 * ( t + 2 ) + 1 / 4 * t = 1 - - > multiply by 16 - - > ( t + 4 ) + ( 2 t + 2 ) + 4 t = 16 - - > t = 10 / 7 ; hence peter has done 1 / 8 * ( 10 / 7 + 2 ) = 1 / 8 * 24 / 7 = 3 / 7 answer : e"
annotated_formula: divide(const_4, add(multiply(const_4, const_2), const_1))