I found PERT examples include a formula
(a + 4m + b)/6
where a= optimistic time , b= pessimistic time and m= actual time to complete the task
but how to calculate a and b? please help me as soon as possible
You don't calculate a and b, you estimate them. And m is usually the most likely time (estimate) not the actual time.
How do you estimate them?
That's a hard question... you need to consider the best possible scenario, and the worst. It takes practice and experience. You will likely get it wrong the first few times.