Aluminate anion can be written in many ways, depending on how the salt is hydrated. These reactions are perfectly equivalent, although the first one is closer to what is happening in the solution, while the second one refers to a process in which Al is dissolved in NaOH, and then the produced aluminate is recovered and dried out.