This is easiest to answer using standard form, which is usually thought of as ax+by=c. For your problem, I'd think of it more as xA + yB = total time.
Your equation for Monday would look like this: 6A + 5B = 12.
Your equation for Tuesday would be 2A + 3B = 6.
Once you have the equations, there are several different ways you could solve this. The easiest way is to graph the equations and find the solution. If you use that method, remember to change the equations into regular standard format. 6x+5y=12 and 2x+3y=6. When you look at the solution (x,y), the x value will be the time that session A lasts and the y value will be the time that session B lasts.
If you don't have access to a graphing program like Desmos, I can show you how to solve it by hand.