The slope of the tangent line to the curve at a point (x, y) is dy/dx. By the chain rule, this is equivalent to
dy/dθ × dθ/dx = (dy/dθ) / (dx/dθ)
where y = r(θ) sin(θ) and x = r(θ) cos(θ). Then
dy/dθ = dr/dθ sin(θ) + r(θ) cos(θ)
dx/dθ = dr/dθ cos(θ) - r(θ) sin(θ)
Given r(θ) = cos(3θ), we have
dr/dθ = -3 sin(3θ)
and so
dy/dx = (-3 sin(3θ) sin(θ) + cos(3θ) cos(θ)) / (-3 sin(3θ) cos(θ) - cos(3θ) sin(θ))
When θ = π/3, we end up with a slope of
dy/dx = (-3 sin(π) sin(π/3) + cos(π) cos(π/3)) / (-3 sin(π) cos(π/3) - cos(π) sin(π/3))
dy/dx = -cos(π/3) / sin(π/3)
dy/dx = -cot(π/3) = -1/√3