Yes, if you take English Extension 2, you will need to sit the HSC exam for English Advanced, English Extension 1 and English Extension 2 (the latter does not have an exam but an equivalent form of assessment).
In terms of what will contribute towards your ATAR, the rule is that your best 2 units of English will count towards your ATAR, which can be comprised of 2 units of English Advanced, 1 unit of English Extension 1 plus 1 unit of English Extension 2 and (I believe) 1 unit of English Advanced plus 1 unit of English Extension 1 or 1 unit of English Extension 2.
I hope this helps!