Find the equation of the line perpendicular to the line passing through (2,4) and (3,7)

The slope of the line through those points is (7-4)/(3-2) = 3. That means your perpendicular line must have slope -1/3.

Pick a line with the equation

y = -x/3 + b

and choose b so that it goes through the point that you want.

You must not have stated the question inrrectly. A line that is perpendicular to one passing both of your points cannot go through both of them again. you must choose a single point for it to go through.