Since you did not say otherwise, I am going to assume that (a) all jobs are available for release at time 0, (b) each machine can handle any of the jobs and (c) your criterion is minimizing makespan (time the last job completes).
You can use mixed integer linear programming (MILP) or constraint programming (CP) to find a provably optimal schedule. Because genetic algorithms (GAs) are metaheuristics, they do not always find optimal solutions (although they sometimes do), and even when they do you do not get a proof of optimality (so typically you cannot be sure the solution is optimal).
That said, if you want to use a GA, one approach is to use a permutation chromosome. Some GA solvers support permutations directly; if not, you can work around that limitation.
Assuming there are $n$ jobs, your chromosome represents a permutation of the indices $1,\dots,n$ indicating job priorities. Whenever a machine in either stage becomes available, it is assigned the highest priority job in the queue for that stage. If a job encounters two idle machines (which will happen at the very outset in the first stage, and at least once in the second stage), assign it to the machine which will process it faster, breaking ties arbitrarily. Since GAs maximize fitness and you want to minimize makespan, the fitness of a chromosome is the difference between an upper bound on the makespan and the actual makespan for the schedule (chromosome).