The only way to transfer is to use a bus between Gates 25 and 52. To use this bus, you will need a BP for a flight departing from the other Pier. Since the QP is in pier A/B you need to use immigration there before proceeding to Gate 25 approx ¾ hour before your scheduled flight.
Note, although I have done this twice successfully, there have been reports of passengers not being permitted to use the immigration for the pier where the flight is not departing from.
See this map:
http://www.sydneyairport.com.au/NR/r...ryBrochure.pdf