Answer:
He completed 13 courses worth 3 credits and 5 courses worth 4 credits.
Explanation:
Let
Number of courses worth 3 credits = x
Number of courses worth 4 credits = y
1. The student completed a total of 18 courses, then

2. The student earned a total of 59 credits, he earned 3x on 3 credits' courses and 4y on 4 credits' courses, so

3. You get the system of two equations:

From the first equation

Substitute it into the second equation:

He completed 13 courses worth 3 credits and 5 courses worth 4 credits.