Let m=number of months of membership
Club A cost equation: C(A) = 28 + 26m
Club B cost equation: C(B) = 19 + 29m
By setting the two equations equal to one another, you can then solve for m and that will be where the costs match:
28+26m = 19+29m
9 = 3m
m = 3 months
So Club B is lower cost for a 1 or 2 month membership.
The costs are the same for memberships lasting 3 months.
Club A is lower cost for memberships lasting 4 or more months (it has the lower per-month cost).
Plug in m=3 into either equation to find the cost for 3 months.