You can apply for in-state tuition any semester. Generally speaking, Maryland likes to see bare minimum that you've at least changed your driver's license for at least a year before considering you for in-state residency.
Many students have received in-state residency after 2-3 semesters into the program, but it also matters as to how much time and effort you put into showing that you are dedicated to the state after your graduate (even if you do decide on leaving the state after graduation...).