Australia claimed two late wickets after declaring their first innings on 527-7 to take control of the third Ashes Test on day two at Old Trafford.