Answer
Both prevent unjust enrichment, but solutio indebiti is the narrower of the two. Solutio indebiti, under Article 2154, arises specifically when a person receives something that was not due to him and it was unduly delivered to him through mistake — he must then return it. Unjust enrichment under Article 22 (accion in rem verso) is broader: it does not require a mistake in payment, only that one party was enriched at another's expense without just or legal ground.
So every solutio indebiti is a form of unjust enrichment, but not every unjust enrichment is solutio indebiti. Solutio indebiti is a specific quasi-contract that hinges on a mistaken payment; accion in rem verso is the general, subsidiary remedy that applies when no contract, quasi-contract, crime, or quasi-delict covers the situation.