Let's check the first one, 18a which is not right. It's from 6(a)*3.
The second one is right, 6(a) = 6a and -6(3) = -18. Then we get 6a-18 which is right. then factor and get 6(a-3)
The third one is similar to the first one except 3 is in negative form (aka -3). But you get 6a-3 for the third one. factoring 6a-3 and you get 3(2a-1)