Working alone at its constant rate, machine A produces x boxes in 10 minutes and working alone at its constant rate, machine B produces 2x boxes in 5 minutes. How many minutes does it take machines A and B, working simultaneously at their respective constant rates, to produce 3x boxes?