Assuming you're asking if it's safe for dogs to eat meat that's been frozen for two years, the answer is yes. Frozen meat is safe for dogs to eat indefinitely, as long as it was stored properly. That means the meat was wrapped tightly and stored in a freezer that maintained a consistent temperature of 0 degrees Fahrenheit or below. If the meat was stored above that temperature, bacteria can grow and make the meat unsafe to eat.
However, just because frozen meat is safe for dogs to eat doesn't mean they'll enjoy it. After two years in the freezer, the texture and flavor of the meat will likely be significantly changed, making it unappetizing to most dogs (and humans!). So while there's no risk of food poisoning if your dog eats two-year-old frozen meat, don't be surprised if they turn their nose up at it.