The trick is to look at the last number (with no variable near it) and break it into all its possible factors, and then to see which add up to give the middle number:
1. 18 is 18*1 , 6*3, 9*2
One of each pair has to be negative to make 18 negative. You can see that a +6 and a -3 will give you what you need.
(y+6)(y-3)
It takes some time and practice before you can start seeing these. The best way to walk through it is to find out which two numbers multiply to the number required, then find their sums until you find the one you're looking for.
For #1: You need two numbers that multiply to -18 and add to +3, so find the possible multiples: