Answer:
m=M
Step-by-step explanation:
In case we say that the green block's mass m is less than red block's mass M, then the green block would have bounced and moved back to the left instead of coming to rest. The other case where if mass of green block's mass m would have been greater than the red block's mass M, the green block would have kept moving to the right instead of coming to rest. After collision, the red block moves to the right because of exchange of velocities. Therefore, m=M since m comes to rest and M moves to the right