Answer
5 months, ${{\$}} 165$
Work Step by Step
Let x = months of membership.
The cost at Club A = $40+25x $
The cost at Club B = $15+30x $
We want the x for which these two costs are equal.
$15+30x=40+25x \qquad $ ... add $-25x-15$
$30x-25x=40-15$
$ 5x=25\qquad $ ... divide with $5$
$ x=5$
After 5 months, the costs will be equal.
Substitute $x=5$ into one of the cost expressions:
$15+30(5)=15+150={{\$}} 165$