It is impossible to say. Some people pass first time, some still have problems after several attempts. It depends on your ability, strengths and weaknesses, and also on how much time you can dedicate to studying.
Because of the nature of the syllabus and exam questions, generally more time should be given to practising questions than studying the theory (though that is also important).
If you have studied P3 I would estimate that P5/APM would take a similar time.