We need to decompose our forces.

Since there is no friction, we need the gravity component of the 18kg mass in the direction of the surface to equal the tension component of the rope in the direction along the surface.

This means,

Solve for T.

The 18*9.8 represents the force in Newtons of the mass on the surface. The sin/cos come from the construction of triangles and equating the Tension with the Force of the Weight in the same direction (along the surface of the ramp)