If there is no separation of cities on your w-2, you can take the entire income, divide by 365 (days) and mutiply by the number of days in Yonkers, and the number of days in Queens.
Example: You earned $35,000 all year. Divided by 365 days gives you $95.89 per day. Multiply that amount times the number of days in each location.