First of all, I like your approach, which is pretty straightforward. For two girls we have $8$ different spots, and then $8$ boys can be spotted randomly. Hence, there are exactly $$ P(8,2) \times 8!$$ ways.
Now think differently.
step 1. Compute all the permutations of $10$ people, which gives us $10!$
step 2: compute all the permutations where two girls occupy two end spots. In this case, we have $2! \times 8!$ permutations.
step 3. compute the number of permutations where exactly one girl takes an end spot. In this case, you fix exactly one girl at one of the end spots, and another girl sits somewhere at a middle spot. Now we have $$4\times 8 \times 8!$$ permutations.
Note that there are no common permutations between step 2 and step 3. Hence, subtracting the total number of permutations of step 2 and step 3 from step 1's permutations should yield the result. Varify that both solutions give the same answer.
One comment about your second approach: when you trying to solve the problem using your second method whenever you're fixing a girl at some end spot, please make sure that another girl does not occupy another end spot. This is just to make sure there is no overcounting with step 2. By the way, you definitely can overcount and balance things by inclusion-exclusion, but I would not recommend doing so for this kind of straightforward problem.