tom , working alone , can paint a room in 6 hours . peter and john , working independently , can paint the same room in 3 hours and 3 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 ) / ( 5 / 6 ) = 2 / 5 hours peter worked for 7 / 5 hours so he painted 7 / 5 * 1 / 3 = 7 / 15 of the room . the answer is d ."
divide(const_4, add(multiply(const_4, 3), const_1))