Hi Vidya,
As the entitlement is for 5 days and if employee availed 2 days of leave means, this can be deducted from the entitlement of 5 days.
The pro-rated leave calculation can be done if employee leaves the company. At that time, the entitlement can be calculated for number of months worked and if there is any negative leave balance from employee (availed leave beyond entitlement) this can be deducted from the final settlement.
Meanwhile, I suggest you may think of standardize your leave policy which highlights, total leave entitlement and maximum number of days that can be taken in single slot and the process around this.
In my previous company, the total leave entitlement has been spitted for 4 quarters, this will allow both the employee and employer to manage the leaves effectively.
If employee exhausted the leave balance of 1 quarter, still the entitlement from the next quarter will be taken and the opening balance for next quarter will show (Quarter entitlement - extra leaves taken in previous quarter)
Regards
Thiyagu