Answer
Force
Fa = 30 N
Work Step by Step
Case 1
Acceleration of the system
a = Fa/(ma+mb)
a = Fa/12
Given that the force between the blocks is 20N
20 = mb Fa /12
240 = Fa (mb) eq (1)
Case 2
Acceleration of the system
a = Fa/(ma+mb)
a = Fa/12
Given that the force between the blocks is 10N
so
10 = ma Fa /12
120 = Fa (ma) eq(2)
From both equations we have
360 = F ( ma+mb)
360 = Fa x 12
Fa = 30 N