How do I differentiate between addressing two professors with the same last name?
There are few things you can do.

Call each by their full name like 'Professor Ann Smith' or 'Professor Bill Smith'.
Ask whether you can call them by 'Professor first-name' like 'Professor Ann' or 'Professor Bill'.
Continue to use 'Professor last-name'. They'll either decide who will answer or ask you to clarify which person you wanted.
And the easiest, as pointed out by Buffy, ask the professors if there's an alternate, unique name you can use so you can differentiate between them.