tom , working alone , can paint a room in 6 hours . peter and john , working independently , can paint the same room in 3 hours and 4 hours , respectively . tom starts painting the room and works on his own for one hour . he is then joined by peter and they work together for an 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 ?
"tom paints 1 / 6 of the room in the first hour . tom and peter paint 1 / 6 + 1 / 3 = 1 / 2 of the room in the next hour for a total of 4 / 6 . the three people then paint the remaining 2 / 6 in a time of ( 2 / 6 ) / ( 3 / 4 ) = 4 / 9 hours peter worked for 13 / 9 hours so he painted 13 / 9 * 1 / 3 = 13 / 27 of the room . the answer is d ."
divide(const_4, add(multiply(const_4, 4), const_1))