You can duplicate the Tutorial: What are Table Occurrences? for your table and use it to set up a "self join" relationship to all other records with the same value in "Pay to":
YourTable::PayTo = YourTable 2::PayTo
If your table has a field with auto entered serial numbers or an auto-entered creation Timestamp, you can double click the relationship line and select a sort order for YourTable 2 that sorts records by either of these fields in descending order. You should then be able to set up the category and amount fields with looked up value auto-enter options that copy data from the same field from YourTable 2 to get data from the most recent previous record with the same Pay To value.