Thanks for your enquiry.
You can do either of your suggestions.
If you were to transfer the legal title into joint names, your Solicitor's charges are likely to be more (approx. £200 plus VAT plus Land Registry fee of approx. £50-£70 depending on the value of the property) than preparing a simple Declaration of Trust (likely cost £100 plus VAT).
The only advantage of transferring the property into joint names is that it means less paperwork as and when one of you dies, but I am guessing that you are considering selling the second property during your lifetimes as you are enquiring as to Capital Gains Tax.
I hope this answers your question, and if so, I would be grateful if you could leave positive feedback.