Basically when you judge it from the accelerating frame of reference then there will be a pseudo force acting on each of the spheres which amounts to 5Ma.
From a non accelerating frame draw an FBD for each of the blocks seperately and then solve the equations simultaneously. You will get what...