Answer:
a) T = 20.601 N
b) T = 9.4585 N
Step-by-step explanation:
The tension in the string if the 5.8 kg box is held in place, so that it cannot move can be obtained as follows
For m = 2.1 Kg
∑ Fy = 0
T - W = 0  ⇒  T = W = m*g
⇒  T = 2.1 Kg*9.81 m/s²
⇒  T = 20.601 N  (↑)
The tension in the string once the box begins to move can be obtained as follows
For M = 5.8 Kg
∑ Fx' = M*a
where x' is the direction of the slope
then
∑ Fx' = M*a  ⇒  T - M*g*Sin ∅ = M*a   (I)
For m = 2.1 Kg
∑ Fy = m*a
⇒  T - W = m*a
⇒  T - m*g = m*a   (II)
If we solve the system of equations that comprises I and II we will know T:
T = M*m*g*(Sin ∅ -1) / (m - M)
⇒  T = (5.8 Kg)(2.1 Kg)(9.81 m/s²)(Sin 45º - 1) / (2.1 Kg - 5.8 Kg)
⇒  T = 9.4585 N