The lump on the back of the foot is a tarsal spur and tells you in this species that the chameleon is a male.
The crooked legs tell you that the chameleon either has MBD now or had it before. The only way to tell if he still has a bone issue is to get an X-ray done at a good chameleon vet.
You should not have been sold a chameleon in that condition without at least being made aware of it.
If he still has weak bones then you will need to give him liquid calcium that you can get from vet along with proper supplements, temperatures, well fed gutloaded insects, etc until the bones and other systems in the chameleon are back to normal....then continue with the proper husbandry to keep the MBD from coming back.