Hello, welcome to the website. My name is Tony, I can assist you with this.
Do you know what the cause of the failure is?
Okay. You do have rights to return the vehicle when it is not of "satisfactory quality", as this is the law under s.14 of the Sale of Goods Act 1979. Any vehicle that is sold which is not of satisfactory quality can be returned and you can demand your money back. This is a fundamental breach of condition of a sale agreement.
Whether something is satisfactory quality depends on all the factors, but it's difficult to see how a car you have just purchased which breaks down 5 miles from the garage you purchased it from can be satisfactory.
All things considered, I expect you have a good basis to question the garage and consider demanding your money back in full.
If you want to keep the car and simply have it repaired, you can do that too. You can either get the garage to repair it, which is your right, or you can have it repaired yourself and invoice the garage for it.
I've given a brief outline of the legal position here, but if you would like more information about it, please just let me know and I will gladly provide you with any clarification that you need.