We have a similar problem with our dog, is pretty old, his back legs are very weak, he is coughing and vomiting, we can't afford to going to the vets, I am afraid that in view of his age, one trip only might have to be sufficient, why leave him to suffer in his old age, put him to sleep while he is still free from pain and suffering.
Unfortunately without an examination by a veterinarian as well as various lab tests, helping your dog recover is going to be difficult. Severe weight loss, vomiting, and diarrhea can be many conditions including certain cancers, conditions of the pancreas, inflammatory bowel disease, organ disease, toxin etc. Hamburger and rice only helps for mild cases of upset stomachs due to "something they ate". It sounds like your dog is suffering right now and so a visit to a vet is urgent.