Start by identifying the charges on the aluminium cation and on the sulfate anion.
You should know that aluminium, which is located in group
You should also know that the sulfate anion, which contains
Now, the key thing to keep in mind here is that ionic compounds must be electrically neutral.
This implies that the overall positive charge coming from the cations must be balanced by the overall negative charge coming from the anions.
The cross-over method allows you to write the chemical formula of an ionic compound by converting the charge present on the cation to a subscript for the anion and the charge present on the anion to a subscript for the cation.
In your case, you have
#"Al"^color(blue)(3+)" "#and #" " "SO"_4^color(red)(2-)#
Apply the cross-over method to get
#["Al"]^color(blue)(3+) + ["SO"_4]^color(red)(2-) -> "Al"_color(red)(2)("SO"_4)_color(blue)(3)#
This is equivalent to saying that in order to have a neutral ionic compound, you need
#"Al"_color(red)(2)("SO"_4)_color(blue)(3) -> color(red)(2)"Al"^color(blue)(3+) + color(blue)(3)"SO"_4^color(red)(2-)#