Greg the trainer has two solo workout plans that he offers his clients: Plan A and Plan B. Each client does either one or the other (not both). On Wednesday there were 5 clients who did Plan A and 3 who did Plan B. On Thursday there were 2 clients who did Plan A and 12 who did Plan B. Greg trained his Wednesday clients for a total of 9 hours and his Thursday clients for a total of 9 hours. How long does each of the workout plans last?