Let's use J for James's age and A for Austin's age. The equations are:
J = A - 4
3J + A² = 28
Just plug (A - 4) in the place of J in the second equation. This gives you:
3(A - 4) + A² = 28
-->
A² + 3A - 12 = 28
-->
A² + 3A - 40 = 0
-->
(A - 5)(A + 8) = 0
-->
A = 5 or -8
-8 is nonsense, so Austin is 5 years old. Therefore, James is 1 year old.