How to apologize for declining an offer from a potential PhD advisor?
The best thing you can do is be honest and explain the situation. You thank the second professor for the offer, explain you accepted another offer and wish the second professor well with their future research.
This is a common situation and the second professor should be understanding.