I was just fiddling with a previously solved 5x5 Rubik's cube, and when I attempted to revert it back to the solved state, it ended up with all but 2 faces solved. I can't remember the moves I did to begin with, unfortunately, nor do I have any idea how to actually solve a 5x5 under normal circumstances.
If the top/bottom faces have these patterns, then you can solve it with the following move sequence
r2 B2 F2 l2 B2 F2 f2 M2 f2 M2
Small letters indicate a turn of a single inner layer (r=right, l=left, f=front), capital letters indicate a move of a single outer layer (F=Front, B=Back) except that M means the middle layer between the r and l layers. All the moves here are half turns, indicated by the 2 on each move.
You can use the same sequence to generate the pattern again.
You can see this algorithm by following this link:
(Note: they use a slightly different notation than I did)