It is protocol, whenever a cop goes into an adjacent jurisdiction they notify the agency in advance. That way when complaint calls come in, or gun shots are fired, the city knows there’s a cop at that location. For some reason this clown apparently did not do that.
Also, despite today’s hit movies and TV shows, the Officer in the uniform is the unquestioned boss on the street. Everyone on day one of plainclothes training is told that... clearly.
Being armed, in street clothes, and giving the man in uniform a hard time is a good way to get your lamp blowed out.