Sorry to hear you failed, the exams are quite hard.
Are you with any trainging providers? If you are, then use them to help you with where you need more understanding on the different topics.
Also revision, Read up on where you are unsure, redo all your progress tests and assignments.
Use the internet, HMRC, google, youtube ect.
Good luck with you exam :D