to improve the condition of her house is an infinitive phrase that functions
as the direct object.
Mary is trying what? to improve the condition of her house