When he attended 5 sessions, he paid the membership fee (m) and five times the fee for each session (5f). He paid $25.

When he attended 10 sessions, he paid the membership fee (m) and ten times the fee for each session (10f). He paid $40.

The system of equations:

The membership fee is $10, the fee for each session is $3.