Do it like it is done in the real world, with foreign aid
This was already suggested by TzeraFNX but he just stated that it works, not how it works. Selectocrate Theory (Theory, Rules for Rulers, Dictators Handbook) offers a great explanation on why and how foreign aid works and will work in this situation.
Every state has three groups (there are several designations for these groups in literature). The residents, the selectorate, and the winning coalition.
How the sizes of these groups are what determines how the state works. Let us take your democracy. Everyone is a resident, everyone with the right to vote is the selectorate (the disenfranchised: children, mentally disabled people, foreigners are not part of it), and the winning coalition is the part of the selectorate which must support you so you can rule (optimally 50%, but in any chase large).
The Autocracy, on the other hand, looks different. Everyone is still a resident, optimally with the option to become part of the selectorate (this is not good for the people, this give the leader the power to replace anyone who cause trouble in the selectorate). The selectorate, on the other hand, is the smallest possible amount of people you need to control the country (loyal head of the military, loyal head of the police, loyal religious leader, loyal family members, loyal clan-chiefs, ... (Whoever you need as long they are loyal.)). Optimally it is the same as the winning coalition if it isn't a purge is in order.
Ruling is nothing but controlling the flow of revenue and paying off your winning coalition so they continue to support you. This is the essence of success in politics. See chapter four, Steal from the Poor, Give to the Rich, and chapter five, Getting and Spending of the book for more details.
The following is based closely on chapter seven, Foreign Aid, of the Dictators Handbook, if you want to read more about it or check the proof for the examples I give you'll find them there.
Imagine you rule a democratic country of 100 people. The winning coalition is 50 people big. You got 1000 € to buy political support. Thus you give everyone in the coalition public goods worth 20 € to keep their support.
Now you rule an autocracy of 100 people. Your winning coalition only has 5 people in it. You again got 1000 € to buy political support. Thus you give everyone in the coalition private goods worth 200 € to keep their support.
The rewards for being in the winning coalition of an autocracy are bigger than those for being in the winning coalition of a democracy. This is in part due to the smaller size of the coalition and because being in the winning coalition of an autocracy is a messy job. How many people do you know who would beet up dissidents for 20 €? Way less than those who would do it for 200€ I guess.
If an outside power now seeks to change the policy of your country it will be much easier for them in the autocracy then in the democracy. I'll assume the policy is unpopular in your country, say it is the recognition of Israel as a nation. Every person in both nations has dislike for this policy, yet for 20 € they would be willing to change their minds. The foreign power would only have to pay the autocracy 100€ for this policy change, as this is how much the winning coalition needs to be paid to accept it. The democracy, on the other hand, would need 1000 € to change its stance on the subject.
It is thus very good that B is an autocracy. If it were a democracy buying the policy-concession of freeing the supers would be prohibitively expensive for A. Now one does not simply send money. One sends foreign aid because it sounds so much less like corruption. Ever wondered why so much foreign aid gets embezzled and the western democracies still keep paying it? Because it does not get embezzled, it was always meant to pay off the relevant people in the receiving country. The USA paid a lot of money to autocratic Egypt and Egypt recognized Israel as a state and made peace with them. They paid money to the autocratic, Muslim regime in Pakistan and they fought the Taliban. The book has a lot of these examples and analyses them as well. There even was a chase where Americans grew annoyed about the useless aid going to Pakistan. So they set up a catalog of rules on how the money had to be used. Pakistan refused to take the money until it was ensured that no one would actually check if these conditions were met.
Now if A is a transparent democracy and its people are opposed to paying fake foreign aid to an autocratic regime there are ways to remedy this. This situation is quite unlikely however as it is very likely that these kinds of deals happened before between these countries and as A is a democracy it is quite likely that they support the dictator of B as the democratization of B would make gaining policy concessions much harder. Assuming that B's leadership does not have the blessing of the resource curse, they need their people to be minimally cared for as they would be unproductive otherwise and no money could be made of them. This means that they need to invest in primary education, basic healthcare and supply money for people to start small business. If A were to pay foreign aid targeted at these sectors (the only ones where real-world foreign aid is truely successful) B's government would not need to embezzle the money. They could just cut their own spending in these sectors and use the money for more relevant things.