The given equation can be written as
tanx+tanx+tanπ31−tanxtanπ3+tanx+tan2π31−tanxtan2π3=3
⇒tanx+tanx+√31−√3tanx+tanx−√31+√3tanx=3
⇒tanx+8tanx1−3tan2x=3
⇒tanx(1−3tan2x)+8tanx1−3tan2x=3
⇒3(3tanx−tan3x)1−3tan2x=3
⇒3tan3x=3⇒tan3x=1
⇒3tan3x=3⇒tan3x=1⇒3x=nπ+π4⇒x=nπ3+π12