A formula to solve this problem is:

#e = p * h * w#

Where:

#e# is the total earnings. $3,272.50 for this problem.

#p# is the hourly pay. $8.50/hr for this problem.

#h# is the number of hours worked. 35 hrs/wk for this problem.

#w# is the number of weeks worked. What we are solving for in this problem.

Substituting the values from the problem gives:

#$3272.50 = ($8.50)/"hr" * (35 "hrs")/"wk" * w#

First, we can cancel the common terms in the numerators and denominators:

#$3272.50 = ($8.50)/color(red)(cancel(color(black)("hr"))) * (35 color(red)(cancel(color(black)("hrs"))))/"wk" * w#

#$3272.50 = $8.50 * 35/"wk" * w#

#$3272.50 = ($297.50)/"wk" * w#

We can now multiply each side of the equation by #color(red)("wk")/color(blue)($297.50)# to solve for #w# while keeping the equation balanced:

#color(red)("wk")/color(blue)($297.50) xx $3272.50 = color(red)("wk")/color(blue)($297.50) xx ($297.50)/"wk" * w#

#color(red)("wk")/color(blue)(color(black)(cancel(color(blue)($)))297.50) xx color(blue)(cancel(color(black)($)))3272.50 = cancel(color(red)("wk"))/cancel(color(blue)($297.50)) xx color(blue)(cancel(color(black)($297.50)))/color(red)(cancel(color(black)("wk"))) * w#

#(3272.50color(red)(" wks"))/color(blue)(297.50) = w#

#11 " wks" = w#

John has worked at Buy-The-Best for #color(red)(11)# weeks.