Rent deduction question

Here's the problem: Lane, a single taxpayer, received $160,000 in salary, $15,000 in income from an S corporation in which Lane does not materially participate, and a $35,000 passive loss from a real estate rental activity in which Lane materially participated. Lane's modified adjusted gross income was $165,000. What amount of the real estate rental activity loss was deductible? A.$0 B.$15,000 C.$25,000 D.$35,000 *** Hi, from this question, why don't we consider the $165,000 as part of the calculation for the rent deduciton? Since its over $150,000, shouldn't the answer be A? This question is from Ninja MCQ but the answer solution tells us to calculate the modified AGI using the given info.. Here's the solution given: Individuals may offset up to $25,000 ($50,000 if married filing jointly) of ordinary income with rental real estate activities. This deductible loss is reduced (but not below zero) by 50% of the amount by which the modified adjusted gross income of the taxpayer for the year exceeds $100,000. First, the passive activities were netted $15,000 from the S corporation - $35,000 from the rental = $(20,000). Second, the salary of $160,000 is decreased by the net $20,000 passive activity loss for a modified AGI before limitation of $140,000. Third, the amount of $140,000 that exceeds $100,000 is multiplied by 50%, equaling $20,000. Fourth, the rental loss of $35,000 is decreased by the $20,000 limitation, leaving an allowable deduction of $15,000. Thanks!