You can calculate the velocity of each individual worker and model the velocity of both working together as the sum of the two individual velocity. Then you solve for the time.
Jack's velocity: 28 boxes / 2 h = 14 boxes / h
Walter's velocity: 36boxes / 3h = 12 boxes / h
Together velocity, V = 14 + 12 = 26 boxes / h
65 boxes => V = 65 boxes/t => t = 65 boxes / V
=65 boxes / 26boxes/h = 2.5 h
The equation that models the situation is V = 65/ t or t = 65/V