when the wedge is moved with accl^n a the body of mass m experieces a psuedo force ma towards opposite direction of the motion of wedge (as shown in figure).
Now resolving the forces as shown in figure...
we get ( for the body to remain at rest)
ma.cos

= mg.sin

or a = g.tan

____________(1)
This is the accl^n to be provided to the wedge so that the block doesnot fall.
So again from figure we get that the force which the block gives the incline perpendicularly = ma.sin

+ mg.cos
This force = force given by incline on the block....( from Newton's 3rd Law)
So reqd. force = ma.sin

+ mg.cos

= mg.tan

.sin

+ mg.cos

.........[ by (1) ]
= mg / cos

...