1.Do you know what the best thing is?
这里what the best thing is是宾语从句,做know的宾语
而这个宾语从句当中,what充当表语成分,还原成陈述语气是 the best thing is ……
what是代替了“……”的表语
2.Do you know what is the best thing to do?
what is the best thing to do同样是宾语从句,而这里的what在从句中充当主语成分,因为还原语气之后是 sth.is the best thing to do .这里what 代替了sth.