In FIRST CONDITIONAL clauses the tenses change in the usual way. "If she doesn't apologise, I'll never speak to her again," he said. He told me that if she didn't apologise, he would never speak to her again.
In SECOND CONDITIONAL clauses the tenses do not change unless we describe an entirely unfulfilled or impossible condition. "If I were you, I'd stop drinking." he said to his cousin. He told his cousin that if he were him, he would stop smoking. "If I were rich, I would marry her", he said. He said that if he had been rich, he would have married her.
In THIRD CONDITIONAL clauses no verb changes are required. "I would have been in bad trouble if Brian hadn't helped me," she said. She said that she would have been in bad trouble if Brian hadn't helped her.
1) if he had been me, he wouldn't have helped her 2) if I bought that motorbike, I'd be happy 3) if she left, she'd catch the bus 4) if I'd passed my exam, she'd have bought me 5) if he had been rich, he would have spent 6) if Alice hadn't come late her boyfriend wouldn't have gone mad