The state of Maryland plans to buy the rights to the Preakness Stakes, matching an $85 million offer from Churchill Downs.