Make free body diagrams for both masses. Make y-axis for block on plane parallel to the plane itself for simplicity.