How do I politely ask a professor to contact another professor he knows to accept me as PhD student? I sent an email to a professor for possible acceptance as a PhD student, but sometimes it takes too long to hear back.

I know another professor, that has a good knowledge (experience) with the first professor. Can I ask this second professor, in polite way, to contact the first one, and discuss with him whether to accept me as a student?

Is this possible? What should I say to the second professor?
If you know the second professor well, there's no harm in hinting.

By "hinting", I mean, you're having a chat with Prof. 2, and you mention that you wrote to Prof 1 but haven't heard back.  Ask for Prof 2's advice -- for example, "Do you think I should try sending him a second email?"

If you're lucky, Prof 2 will at this point offer to speak up on your behalf with Prof 1.

If not, during this conversation you will hopefully get vibes in one direction or the other, and will know whether it would be worthwhile to make the request.

The worst that could happen would be that Prof 2 says no.

By the way, I hope you have tried re-sending your original email.  People are fallible, especially when it comes to answering email.