Brooke and Daniel had started dating before episode one of Greenhouse Academy ("Pilot"), and they continue dating throughout Season 1, and Season 2. Their relationship first ends in Episode 12, Season 1 ("L.D.R"). But in Season 2, Episode 1 ("Escape Mechanism") after Brooke has been led into a trap, hypnotised by Marcus, and then comes back after vanishing for a day, Daniel and Brooke get back together. The reason why Brooke suddenly changes her mind is because of the hypnosis, which caused her to forget that she discovered Judy's and Marcus' plans, but since Judy had found out earlier in the episode that Daniel and Brooke had broken up, she thought it was a good opportunity to help Daniel by getting them back together.
They stay together until Season 2, Episode 7 ("The Spiral") where Daniel and Hayley de-hypnotise Brooke, but they come to the conclusion that if Judy doesn't know that Brooke has been de-hypnotised then they could use that as an advantage against her. Because of this, Brooke and Daniel pretend to be in a relationship until Episode 11 ("Bad Decisions"), where Brooke reveals to Judy that she is no longer hypnotised, and that she, and her friends know her plans.