You write down all the forces on each mass, then resolve them parallel and perpendicular to the surface of the hill. The perpendicular forces on each mass must balance; the net force down the hill must give rise to an acceleration (the same for both masses since they are rigidly fixed together).
You don't say which mass is lower so I will assume mass A is lower (this will only affect the sign of the tension);
Mass A:
Perpendicular: FNA = mAg*cos(θ) ...(1)
where FNA is normal force, mA is mass of A; g is gravitational acceleration; θ is angle to horizontal.
Parallel: mA*a = mAg*sin(θ) - μAFNA - T ...(2)
where a is acceleration; μA is coefficient of friction for mass A; T is tension in the bar.
Mass B:
Perpendicular: FNB = mBg*cos(θ) ...(3)
Parallel: mB*a = mBg*sin(θ) - μBFNB + T ...(4)
Use (1) in (2) and (3) in (4)
mA*a = mAg*sin(θ) - μAmAg*cos(θ) - T ...(5)
mB*a = mBg*sin(θ) - μBmBg*cos(θ) + T ...(6)
Add equations (5) and (6):
(mA + mB)*a = (mA + mB)g*sin(θ) - (μAmA + μBmB)g*cos(θ)
or
a = g*sin(θ) - (μAmA + μBmB)g*cos(θ)/(mA + mB) ...(7)
Substitute (7) back into (5) or (6) and rearrange to get T. I'll leave you to do this and to plug in the numbers (you should get something close to a ≈ 3.5m/s2 and T ≈ -25N)