A common stratergy you can use to tackle these problems is to treat the two boys, as a single person, and then just count the possible ways to arrange the people.
Lets think of these 2 boys, as a single person. Then, there are 4! ways to arrange the single person, and the 3 other girls in a line.
There is also usually a mistake made, because the two people mixed in as a single person, can also be re-arranged.
4! * 2! = 48
This problem is similar to the AMC 8 2020 #10 problem.
You can view the problem here:
https://artofproblemsolving.com/wiki/index.php/2020_AMC_8_Problems/Problem_10