If you sell the UK property after you return to the UK, say in November 2016, the UK CGT position for each of you individually will be as follows:
Total period of ownership to November 2016: 164 months
Period of owner occupation: 14 months
Period of letting: 150 months
Gain: £51,500 (£240,000 - £137,000 / 2) This can be reduced further by deducting legal fees (purchase and sale), survey fees, stamp duty, selling agent fees etc)
Exempt gain: £10,049 (£51,500 / 164 x 32 (14 months of occupation + last 18 months of ownership)
Letting period gain: £41,451 (£51,500 / 164 x 132 (150 - last 18 months of ownership)
Gross Non-Exempt Gain: £41,451
Letting Relief: £10,049 (lesser of £40,000, £10,049 and £41,451)
Annual CGT Exemption: £11,100
Net Taxable Gain: £20,302
CGT @ 18% or 28% or a combination of the two rates depending on the level of your income in 2016/17. Look here to see how to calculate your CGT rate.
Non-UK resident individuals became liable to CGT in the UK on gains made on the sale of UK residential property with effect from 6 April 2015. However, if it is beneficial to you, you can use the 5 April 2015 value of the property as your cost which will obviously be higher than the original purchase price of £137,000, so long as you sell the property before you resume living in the UK. Take a look at the notes here and here for more information. The potential downside to a sale before you return to the UK is that you may have to pay CGT in Spain. You would need to seek local advice on that as I'm not an expert on the Spanish tax system.
I hope this helps but let me know if you have any further questions.