The 2nd molar is definitely going for a root canal. The 1st molar also might go for a root canal, but the x-ray is not clear. You need to get another x-ray done to confirm that, or at least post a clearer photo. You also told that the dentist said that the place is not reachable, and so that tooth can be extracted after some time. I think that was about the 3rd molar (wisdom tooth), which is the last tooth in the mouth.
Next Steps
Get treated immediately. If you postpone, the teeth might have to be removed as they will cross the stage of being salvaged with root canal.