Finely dice the onion and finely chop or crush/grate the garlic.
Warm roughly half of the oil in a small-medium skillet/frying pan over medium heat and add the onion. Cook for a couple minutes until the onion softens then add the garlic and aji amarillo paste. Reduce the heat if needed so the mixture doesn't get too brown or burn. Stir to mix and cook a minute.
Add the beans to the onion mixture and mash to break up at least half of the beans, if not more. You should have a mixture of part chunks, part soft, mushy mixture. Cook a minute and mix well.
Add the rice, a little salt and pepper (amount depends on how seasoned the beans were) and if the beans don't have cooking liquid, add the broth. Stir to mix so that everything is well distributed. Cook another minute or two until the liquid has largely evaporated, stirring now and then.
At this point, you can remove the mixture and let it cool before storing, if not eating immediately. It will also firm up a little more, making it slightly easier to cook in the next stage, though it works fine to cook immediately as well.
Either use a clean skillet/frying pan or clean out the one you used then warm over a medium-high heat and add the remaining oil. Divide the mixture into two (for one quantity of the recipe, more if you multiply) and form each into a flattened circle/oval patty.
Cook either one at a time, or at the same time as long as you have a bit of space between them in the skillet/pan so they are not too crowded. Cook for around 3 - 4 minutes until gently crisp and golden, then carefully flip over and crisp the other side.
Serve with toppings/garnishes of your choice eg salsa criolla, a fried egg, fried plantain and/or some slices of avocado or a thin steak.