Shared ownership of house with ex-mother in law. Got divorced. On the deed it says I own 25% of the house but court order only gave me 9%. how do I write off the loss

Deed shows 50% Trust(mother in law), ex (25%), me (25%). Per the court order I was only given 9%, my children 3% of the profit of the sale of the house. Mother in law never lived in the house. Only our 2 names were on the mortgage. My ex not mentioned in the court order. How does all this work for taxes