If there is only one solution, at x=-3, then the factor of (x+3) must be repeated. The equation must be equivalent to
... (x +3)² = 0
This multiplies out to give
... x² +6x +9 = 0
The value of m is 6.
_____
For finding the square of a binomial, you can either use the special form you have memorized:
... (x +a)² + x² +2ax + a²
or you can use the distributive property.
... (x +a)² = x(x +a) +a(x +a)
... = x² +ax +ax +a² = x² +2ax +a²