How do I write an quadratic equation whose roots are -2 and 6 and whose leading coefficient is 2

if a is a root, then (x-a) is a factor. So, you want

y = 2(x+2)(x-6)