Note that the initial presence of tan(x) = sin(x)/cos(x) and cot(x) = cos(x)/sin(x) implies we must have sin(x)!=0 and cos(x)!=0. With that:
tan(x) = cot(x)
=> sin(x)/cos(x) = cos(x)/sin(x)
=> sin(x)/cos(x)*sin(x)cos(x) = cos(x)/sin(x)*sin(x)cos(x)
=> sin^2(x) = cos^2(x)
=> sin(x) = +-cos(x)
If we examine a unit circle, we find that this equality holds at x=pi/4+npi/2, n in ZZ. Thus, we must only find which values of n cause x to lay within the interval [0, 2pi) Testing, we find that
pi/4+npi/2 in [0, 2pi) for n in {0, 1, 2, 3}
Substituting those in, we get our answers:
x in {pi/4, (3pi)/4, (5pi)/4, (7pi)/4}