# Can we change frame of reference twice in a single problem?

My question has an inclined plane of mass $M$ and simple block kept on it, of mass $m$ (Both on a table). All surfaces are friction-less. Both of the objects would move, block down the incline and inclined plane parallel to the table, somewhat opposite to the block. Can the two equations I make be from the Free Body Diagram (FBD) of incline, in GROUND frame, and FBD of block in the INCLINED-PLANE frame? Or do I need to solve in a single frame(either GROUND or INCLINED-PLANE)?

-