I think they are basing the amount of the percentage discount you got off the purchase to the sale value, so you paid 200 for property worth 275, so 75/275 of the proceeds they seem to be claim is repayable, as selling within the time period. From previous posts in some cases there was nothing to state this repayment if the sale proceeds were less that original purchase price, but was obviously to ensure the seller didn't gain if the price rose given that you didn't pay full market value.
Calculating using the above 75/275 * 210 = 57k so think that's where the 58 repayment is coming from.
You need to check your documentation as could vary depending which Local Authority you purchased from.