regulatory protein interacts directly with the genome to switch transcription on

What happens when glucose and lactose are present

It prefers glucose; the enzymes for glucose breakdown in glycolysis are continually present.

Only when lactose is present and glucose is in short supply (cAMP level high, Activate CAP) does E. Coli use lactose and only then does it synthesize enzymes necessary for lactose breakdown (lac mRNA synthesized)