Seeing as they have two completely different functions it isn't really possible to compare. PSP wins in terms of portability, PS2 wins in terms of I/O functions. As for library I think it is about even for me, though I think for most people it slides heavily into the PS2's favor.

In terms of absolute power the PS2 wins hands down, the only reason that the PSP can port a lot of PS2 games is it uses a smaller screen and much lower resolution.