Hello,
From the picture that you’ve shared, the cavity that has developed is not deep enough clinically to cause pain. However a radiographic examination is must to know the exact depth of the cavity. And about the wisdom tooth, they are known to cause referred pain, also food lodgement could be the reason.
Next Steps
Ask for an X-ray of all three molars to confirm the exact cause of the pain.
Health Tips
Until then gargling with warm water with a pinch of salt could be helpful.