Queens Park Rangers 1 Cardiff City 0. Match Report
Mahon headed into the corner of the net from Peter Ramage's right-wing cross ten minutes from the end to boost Gareth Ainsworth's chances of landing the job of Rangers coach.
Ainsworth, in caretaker charge following the recent sacking of Iain Dowie, could be installed on a full-time basis by boss Flavio Briatore after two wins and a draw in his four games at the helm.
Cardiff were left facing an uphill task after the 27th minute sending off of centre-back Darren Purse, who was shown the red card for a high challenge on winger Lee Cook.
And to compound the visitors' misery, Miguel Comminges was sent off with four minutes remaining after picking up a second yellow card for dissent.
Before Purse was given his marching orders, Cardiff looked the better side and came close to scoring when Michael Chopra shot wide.
Chopra, who returned to Cardiff from Sunderland this week, was playing against the club he turned down in order to re-join the Bluebirds on loan.
Cardiff threatened again when Peter Whittingham found Stephen McPhail, whose shot was tipped away by Rangers keeper Radek Cerny.
Purse's dismissal stopped Cardiff in their tracks, although Rangers struggled to make their extra man count.
Ainsworth sent on playmaker Akos Buzsaky and later fit-again striker Patrick Agyemang in a bid to inject some life into his team.
Buzsaky had a 30-yard drive pushed away by Cardiff keeper Tom Heaton and Cardiff looked like securing a deserved draw.
But Mahon broke the deadlock and Cerny produced a last-gasp save to keep out Roger Johnson's header.
Cardiff City Official Website