Teeth shaking after cleaning is an indication of bone loss around those teeth. It cannot be cured by medicines. You can either stabilise it with support from the next teeth through a procedure called 'splitting' after the necessary treatment to completely remove any gum infection. Or if those teeth have severe bone loss it is better to get it removed and go for a bridge type denture.
Next Steps
get an x ray done to see how bad the condition is.
Health Tips
do also make sure that all your other teeth are healthy and not affected with the same problem.