Remember that
tangent and cotangent are cofunctions
The tangent of an angle equals the cotangent of its complement.
in this problem we have
tan(2pi/9)
the angle is (2pi/9)
the complement is equal to
pi/2-2pi/9=50pi/180=5pi/18
therefore
the Cofunction is
cot(5pi/18)