2001 Audi A4 1.8T Quattro

My 3rd brake light stays on when headlights are on and I’m getting a loud beep sound when pressing on the brake. Everything works fine when headlights are off what could be the problem?