[tex] \underbrace{2\cdot3\cdot2\cdot1\cdot1}_{\text{BGGGB}}=12 [/tex]
12 arrangements
Or different approach.
Since boys and girls have different places in a row they can take (boys at ends, girls in the middle), we can simply multiply the numbers of ways the boys can take their places by the the number of ways the girls can their places. And that is [tex]2!\cdot3!=2\cdot6=12[/tex]