Both scores are factored in, and AAMC recommends averaging multiple scores, so you are essentially applying with a 517. I would not apply to any low tiers with medians around ~510-512 since they will most likely yield protect you for retaking a balanced 511. Focus on applying mostly to Top 20s and upper mid tiers (Rochester, Einstein, Hofstra, Emory etc.).