a = amount given to the 1st share, ratio of 5.
a + 122 = amount given to the 2nd share, ratio of 7.
T = total amount
so the total amount is really "T", and we'll be splitting that into a 7 : 5 ratio, that is, we'll be dividing "T" by (7 + 5) and distribute accordingly.
![\stackrel{\textit{total split by 7 + 5}}{\cfrac{T}{7+5}\implies \cfrac{T}{12}} \\\\[-0.35em] ~\dotfill](https://img.qammunity.org/2024/formulas/mathematics/high-school/igvqgouwj0zkk9t8sly8zn9djjontvnza6.png)
![\stackrel{\textit{we know the 1st share is}}{a= 5\cdot \cfrac{T}{12}}\implies a=\cfrac{5T}{12} \\\\[-0.35em] ~\dotfill\\\\ \stackrel{\textit{we know the 2nd share is}}{a+122= 7\cdot \cfrac{T}{12}}\implies a+122=\cfrac{7T}{12}\implies \stackrel{\textit{substituting from above}}{\left( \cfrac{5T}{12} \right)+122=\cfrac{7T}{12}} \\\\\\ 122=\cfrac{7T}{12}-\cfrac{5T}{12}\implies 122=\cfrac{2T}{12}\implies 122=\cfrac{T}{6}\implies \boxed{732=T}](https://img.qammunity.org/2024/formulas/mathematics/high-school/vc3m07wi6t4g8p78qfykrz36rj2intij8z.png)