Never give your dog any drug you're not sure of.
Call up your vet, and ask if a trip to his office is necessary.
And if not, what can you do at home to help your dog?
Anyway if he's sore, just let him rest a bit!
Ibuprofen is guaranteed to cause fatal bleeding stomach ulcers in dogs, even in very small amounts. Just one (or less) than 200 mg could kill your dog.
Under no circumstances should a dog ever be given any human medicine without the OK from your veterinarian.