I've been DM-ing for a pair of adventurers for about 6 months and I'm really struggling to get one of the players to engage. He leaves all of the talking, decision making and even a lot of the fighting to the other player who is understandably getting narked at essentially having to solo the campaign. Every few sessions the passive player will suddenly pipe up and go on a two hour detour to someplace random like a fudge shop or stir up trouble. I worry that he's bored but he's adamant that he's enjoying the sessions and that he can't wait to see what will happen next. How do I get him to participate more in the sessions?
Don't focus on getting the more passive participant to be more active in the sessions.
I've had this experience before, and attempts to persuade the more passive players to interact more actively just caused those players stress and confusion as to the expectations. My experience as a teacher and as a DM corroborate each other: usually, people don't like to be put on the spot. If the passive player has not assumed a leadership role, you should not try to give them leadership duties, for example.
I don't think you have a problem from the perspective of the passive player. If they claim they are having fun, they probably are, even if they don't seem as engaged as the active player, or even if they don't show their feelings in the same way. In one of my groups that has been running for over a year, I have a player who is often very quiet, sometimes just observing the actions and dialog of the other players while doing her knitting, becoming more active during combat or if something directly relevant to her character occurs. And she absolutely does enjoy the game, even though I often think she's not having fun until she tells me later she had a lot of fun. So, if the player says they are enjoying it, I would not try to change how they are expected to play it.
Try to alleviate the leadership burden carried by the more active participant.
In your scenario, it sounds like the only real problem is that the more active player feels undue stress about having to push the game forward and fulfill leadership roles. Perhaps the stress would be alleviated if you railroaded them a bit more and/or provided an NPC who can fulfill some of the leadership roles. In general, this is not advice that people like to hear, and I often get shot down for even suggesting it. However, if you can take some of the burden of frequent decision-making and leadership off of the active player, whether that is by contrivance or an NPC, you may improve their play experience. And considering the frustrations of the active player, it sounds like they would actually appreciate having some of the decision-making taken from them.
Normally in a larger group of 4 or 5 players these active/passive dynamics would balance out on their own, but, since you only have 2 players, you yourself as the 3rd "player" (we often overlook that the DM is playing the game too) might have to act as the balancing force by giving more agency over the flow of the game to NPC's and other external forces.
Try to hook the passive player in ways that will not distract from the main adventure.
If the passive player occasionally pulls the group on tangents, first see if the tangents are unappreciated. If the more active player enjoys them, and if you enjoy them (but are merely worried about the group enjoyment), and if the passive player enjoys them, then perhaps you should let them be. But if the detours are unwelcome by you and by the active player then maybe you can redirect the passive player's focus slightly.
Find out the kinds of hooks that generally lead them off on the random deviations. Perhaps they are looking for some more lighthearted scenes or something to blow off steam during a more heavy plotline. If that is the case, sprinkle in more B-plots and C-plots to supplement the A-plot. Those B- and C-plots could be as simple as a single round of combat or a 15-minute roleplaying detour, but those small detours could vent the pressure that might be building up leading to those big detours that happen every once in a while.
As always, consider talking to the players first.
In this case, due to the size of the group, I would recommend you talk to each player individually about any changes you might consider making. Iterate on your ideas through those conversations until you figure out something that will work for everybody. Since there are only 2 people to talk to, talking to them separately is not that inconvenient, and talking to them separately should make them a little more candid and open about their thoughts.
Best wishes for your campaign.
"If they're having fun, it's not a problem." I think the next video talks more about engaging the players but honestly, having been there myself, it's best not to worry about it too much. Take notes and see what triggers the detours, or provide callbacks to those detours and see if they react well to those.
The other player not enjoying themselves is more of an issue, and it sounds like they're wanting the passive player to engage more. Instead of focusing on that, can you and the active player have a chat and agree that it is going to be more of a solo and sidekick affair in future, reset your own parameters or what works, and go from there?