Hmm, first necessary to make a translation of pigeon-English.
By 'winning money' your solicitor probably means that he recognises that you have not made a capital gain on the sale - and so your retained 3% will eventually be returned by the hacienda - the Town Hall, I assume - once they have realised that you have not made a capital gain.
In the first part of the letter to you, I think your solicitor is stating that under the rules by which the Spanish operate, you have to be both resident in Spain (you were) AND be registered to pay Spanish income tax, which it seems you were not.
I don't know this for sure, but it is very likely that in that case, the 'rules' by which land transactions occur in Spain mean that the buyer has to retain the 3% and pay it over to the hacienda if the seller cannot demonstrate he/she is both a resdient and an income tax payer - a measure to avoid fraud, I imagine.
I now think that you will eventually get the money back - the wheels of Spanish bureaucracy grind even slower than the UK.