First we represent each of the forces acting on block A and block B, this in a free-body diagram. See the figure below. In block A we can say that the only force that interests us is the traction, therefore, the normal and the weight of block A are annulled. In block B, however, we have two forces acting: the traction and the weight of block B. the tension in the rope it is necessary to first find the value of the acceleration.
We can find the magnitude of the acceleration as follows:
PB=(mA+mB ).a
mB.g=(mA+mB ).a
6 .10=(9+6).a
60=15.a
Calculating the pull on block A
T = mA.a ⇒ T=9 .4 ⇒ T=36 N
Alternative B