Toyota owns a de facto controlling stake in Subaru (~20%).
Due to typical Japanese corporation by-laws, it only takes 33% share ownership for uncontested control of a corporation, and >50% of 33% means they'll never lose a vote for simple majority matters, which is basically everything except selling or dissolving the company.
The 20% threshold is for a guaranteed seat on the board, which lets them put issues up for a vote.
Think of it like how Zuckerberg only owns 13% of Facebook but has >60% of the voting power.
Japanese law allows corporations to only require 1/3 of voting shares present for quorum, and then a majority of those present to pass resolutions. It also allows cross-shareholders (like Toyota) to have special privileges over regular class shareholders (typically right of first refusal over any resolution).
In practice, nothing much will pass without the largest shareholder's approval.
In theory, yes, if those shareholders each keep not attending the meeting called by the other shareholder, they could both independently pass or undo each other's actions.
In practice in a hostile situation, they'll be courting the remaining shareholders to gain majority and won't miss those meetings, which tend to also have rules about how quickly or often they can be called.
It is also legal and typical for the bylaws to include poison pill provisions that would automatically protect the existing >33% shareholder, preventing a second >33% shareholder from existing (thus requiring multiple smaller existing shareholders to join forces to overthrow the largest shareholder).
Related: Ford once had a 33.4% stake in Mazda and there was a bunch of cross-pollination between the two companies at that time. My 2002 Mazda Protege was loaded with various parts bearing the FoMoCo logo. And Mazda engines/chassis powered a bunch of Ford cars world-wide.
Ownership changes over time. At one time ford was in control. Which is why I checked - what toyota is doing makes no sense until you see current situations, now there is an obvious expected return on investment (if it works out of course- if it does they will do this to their own factories, if not they will write it off and not lose much.)
They also own Denso, which is the second largest auto parts company.
And they partner with Subaru on some things, such as the Subaru BRZ and Toyota GR86, which are basically the same car with different badging.