Yikes! Our taxes here are really complicated.
Meghan, as a US citizen, is liable for US income tax on her 'worldwide' income no matter where she's living. US citizen residing abroad tax law is wayyy complicated and the only time I 'dealt with it' was as a forces wife back in the '70s. Even though we weren't residing in the US we still paid taxes.
Harry is a different situation since he's not a citizen, and way more complicated. Whilst he was here he would have been liable for income tax on all US earnings if he was a 'US tax resident' (=here for 183 days in a year). Harry also declared himself a 'US resident' at some point (2024?) which may have affected any tax-exemption status. BUT, his visa category may affect whether or not he pays income tax on foreign-based earnings (ie a diplomatic or 'A-1' visa). I am waaaayyy oversimplifying here. Now that H is back in the UK if he is classed as a 'non-resident alien' he will still be liable for US taxes on US sourced income.
Bottom line, even though they're back in the UK, both H & M may have US tax liability. M definitely on ALL income because she is a US citizen. H possibly on US based income depending if he meets the classification of 'non-resident alien for tax purposes' but only on his US-based income.
The 'time thing' for leaving the US had to do with UK taxes, not US so I'm not touching that with a barge pole. AI says;
"Prince Harry and Meghan Markle’s timing in returning to the UK after six years in the US successfully clears the UK’s five-year "temporary non-residence" window, shielding certain overseas capital gains from UK tax"
Many states (CA included) also require paying STATE income taxes, so HAM would have been liable for those whilst they were living here. I think the requirements follow IRS guidelines for CA tax purposes (if you have to pay IRS tax, you have to pay CA tax) but honestly I don't really know anything about those for sure. But I do know we didn't have to pay CA state tax when we were stationed abroad, but I don't know if that was a military exemption of simply because we had no 'official' Calif address at that time. HAM DO have a California residence so that may affect their liability, too.