Official solution
Given,
\[{\tan ^{ - 1}}y = {\tan ^{ - 1}}x + {\tan ^{ - 1}}\left( {{{2x} \over {1 - {x^2}}}} \right)\]
\[ \Rightarrow {\tan ^{ - 1}}y = {\tan ^{ - 1}}\left( {{{x + {{2x} \over {1 - {x^2}}}} \over {1 - x\left( {{{2x} \over {1 - {x^2}}}} \right)}}} \right)\]
\[\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, = {\tan ^{ - 1}}\left( {{{x - {x^3} + 2x} \over {1 - {x^2} - 2{x^2}}}} \right)\]
\[\therefore\] \[\,\,\,\] \[{\tan ^{ - 1}}y = {\tan ^{ - 1}}\left( {{{3x - {x^2}} \over {1 - 3{x^2}}}} \right)\]
\[ \Rightarrow y = {{3x - {x^3}} \over {1 - 3{x^2}}}\]