First of all, observe that #tan(-(3pi)/4) = tan(pi/4)#, since the two angles are #pi# radians apart.
Then, #tan^{-1}# is the inverse function of the tangent, which means exactly that #tan^{-1}(tan(x)) = x#, if #x# is an angle between #-pi/2# and #pi/2#, since this is the specified range for the inverse tangent function.