For your first problem, which as I understand it was to factor completely
3x<SUP>2</SUP> + 3x + 18
you'd start by removing the commonn factor of 3:
3(x<SUP>2</SUP> + x + 6)
Now, as you've discovered already, the expression inside the parentheses cannot be factored over the real numbers. DON'T overcomplicate things! You're done with
3(x<SUP>2</SUP> + x + 6)
It isn't an equation....you don't need to use the quadratic formula.
For the second problem, you have
x<SUP>2</SUP> = 6x + 7
Subtract 6x and 7 from both sides so that you get 0 on the right side:
x<SUP>2</SUP> - 6x - 7 = 0
The left side factors easily.....