Does it work?  Let's check it using FOIL!

( x - 3i ) ( x + 3i ) = x^2 + 3ix - 3ix - 9i^2
You treat the i guys just like regular variables...  adding "like terms" etc.

And we know that   i^2 = -1

( x - 3i ) ( x + 3i ) = x^2 + 3ix - 3ix - 9i^2 = x^2 + 3ix - 3ix - 9 ( -1 ) = x^2 + 9

Whoa, Dude...  It worked!

x^2 + 9 = ( x - 3i ) ( x + 3i )

Here's another one:

x^2 + 25 = ( x - 5i ) ( x + 5i )


TRY IT:

x^2 + 36 =

9x^2 + 64 =

x^2 + 1 =