Note tanx = sinx / cosx. What you typed is wrong.
For complementary Angles, that is Angles that add up to 90 degrees.
For example 60 and 30 are complementary. 20 and 70 are also complementary, same is 40 and 50. That is because they both add up to 90.
For Complementary Angles:
sinx = cos(90 - x)
cosx = sin(90 -x)
tanx = cot(90 -x)
cotx = tan(90 -x). cotx = 1/tanx
Therefore tan(90-A) = cotA.