Let us of think of it from the point of view of the second professor.
If I were that second professor, I wouldn't bother slipping in this kind of a recommendation to my colleague, unless you possess a very high standing in my eyes, i.e. I'm familiar with your academic work and I feel that your academic profile (which includes the ability as I judged, not just where-you-did-what-from) makes too compelling a case to be turned away. But in that case, if you could impress me that much with your abilities in a fair way, I would argue to myself that you are academically sound enough to also be able to impress the other guy in a similar, fair manner. In that case, you could really make the cut yourself too, even without my recommendation. On the other hand, if I slip in that recommendation, and the other guy is stupid enough to simply take my word for it, and hire you on the basis of my word, and he/she later finds that you are not up to the mark for him/her, it is going to reflect badly on me too. So, that's another reason in favor of not doing it.
So, I think it is best not to take this route. An additional disadvantage could be, that you risk creating an image of a person who is willing to advance in his/her career on the strength of his/her connections, rather than the fair way. And this is never a good image to possess.
Hope that helps :)