First, change the 45 miles per hour to x miles per minute, since the problem is asking for the answer in minutes.
45 miles per hour
= 45 miles per 60 minutes
= 3/4 mile per minute
Now, use a ratio to solve.
30 miles : x minutes = 3/4 mile : 1 minute
30=3/4x
x=40
Nick will take 40 minutes to get to the town.
Hope this helps!