Machine A can do a piece of work in 8 hours while machine B can do the same piece of work in 10 hours. The two machines were set to do the work together but after 2 ½ hours B broke down leaving A alone to complete the rest of the work. How long did it take machine A to do the remaining work.