Make a free body diagram for each block with tilted coordinate systems. Solve the two blocks separately and then bring them together using a common variable (T or a).