State Attorneys General's Offices
Solution 1:
There are two questions here:
- What is the plural of State Attorney General?
- How to express the possessive of that plural?
I can offer a rule for Question 1. Is the person a state, an attorney, or a general? He or she is an attorney, so the plural goes with that noun. In the UK military there is a rank of Major General. What is the plural? Apply the rule: a Major General is a General not a Major, so the plural is Major Generals.
Another couple of UK examples. An important ceremonial post in a county is the Lord Lieutenant. Plural: Lord Lieutenants because, applying the rule, they are lieutenants, not lords. The politicians nominally in charge of the Treasury are each called a Lord Commissioner. Plural: in that case they are lords as well as commissioners, so the plural is Lords Commissioners.
As to Question 2, the issue is really how pedantic you want to be. Ultra pedantic: State Attorneys' General. In less pedantic real life, I do not believe anyone would actually say that, so the apostrophe would go after General.
Capitalisation is a style guide matter not grammar. Some would not capitalise any such titles. Some would follow, out of courtesy, any official guidance, such as the relevant legislation.