To start, we need to complete the square of the equation. To do this, we divide the coefficient of x by 2. Here, 6/2=3. We then find (x+3)^2, which gives us the first part of the equation we want to express, but also leaves us with something extra. Expanding out (x+3)^2 gives us x^2+6x+9. Here we have what we were trying to express but with the extra part 9, so we can write (x^2+6x)=(x+3)^2-9.
Substituting this back into our original equation, we have (x+3)^2-9+11, which equals (x+3)^2+2.Therefore, p=3, q=2.