Yes. What you are describing is dial-up internet, albeit with a mobile connection instead of copper wire between you and the ISP (P2).
Just because it works doesn't mean it's a good idea, however. As others have pointed out at length, you wouldn't get much bandwidth - dial up normally topped out at 56kbps, and you'd probably get less thanks to your mobile connections. Also, you will often find that free calls to n numbers offers tend to put a limit on the maximum length of each call you can place for free, although you can immediately re-dial and re-start the free clock. The telcos can be quite open about this - I have even been instructed, entirely unsolicited, that re-dialing every hour was a valid strategy for avoiding any charges by the salesman while ordering a phone line, so I suspect the reason for the limit is to stop people just leaving a phone off the hook (either accidentally or deliberately to use it as talkback or to do something enterprising like this) and hogging a connection.
If you really needed to do this, there are solutions - such as mobile broadband - that provide a far better ratio of cost to convenience and reliability, if not lower cost overall: the phone call may be free, but the line rental probably won't be (especially if you're getting free calls) and even PAYG phones will probably expect you to top up every few months to keep the number connected. You also need to own and operate P2 (and its internet connection), rather than just connecting straight to the internet from P1.