My understanding is that you select all the resources simultaneously, but for each them you can select if they contribute to pay or to overpay. After that, all those "power of" cards that have contributed to pay will generate double resources.