How to calculate payback period of the project?
This is more finance than economics but here it is:

The payback period is pretty much how much time you need to recover the initial investment. 

Each month, you are saving 10000 - 500 = 9500.  Then you simply just divide 50000 by 9500. This comes out to be around 5. 

I made some simplifying assumptions: Discount rate is 0. This is usually not true, so you would probably have to discount the cash flows. Note: This will probably involve monthly compounding. Check out the formula for annuity. 

Also, just FYI: payback method often results in wrong decisions. When you have a choice, always use NPV.