This is a standard problem.
Write 2 equations. One for block A and one for block B.
Essentially the block B eqn is:
mg - T = ma
The block A one is a a little more involved:
The T is the same in both equations, and is your tension.
Two masses are connected by a string which goes over an ideal pulley as shown in the figure below. Block A has a mass of 3.00 kg and can slide along a rough plane inclined 30.0° to the horizontal. The coefficient of kinetic friction between block A and the plane is 0.400. Block B has a mass of 2.77 kg. What is the tension in the string? [g=9.8ms-2]