Do you know what A and B the difference between those is?は間違っています。
この場合、次のように言うと良いですよ。
ーDo you know the difference between A and B?
「AとBの違いを知っていますか?」
ーCan you tell the difference between A and B?
「AとBの違いがわかりますか?」
What is the difference between A and B?「AとBの違いは何ですか?」でももちろん大丈夫です。
ご参考まで!
シンプルに Do you know the difference? だけでも十分通じますよ。
役に立ちそうな単語とフレーズ
distinguish A from B:AとBを区別する
tell the difference:違いを見分ける、わかる
similarity:類似点(反意語)
nuance:微妙な違い、ニュアンス