A university student completed courses worth 3 credits and some courses worth 4 credits. The student earned a total of 54 credits after completing 15 courses. How many courses worth 4 credits did the student complete?

9
6
20
32

Let x be the number of courses worth 4 credits completed by the student.

The total number of courses worth 3 credits is 15 - x.
The total credits earned from 4-credit courses is 4x.
The total credits earned from 3-credit courses is 3(15-x).
The sum of the credits earned is 4x + 3(15-x) = 54.
Simplifying the expression gives 4x + 45 - 3x = 54.
Combining like terms gives x + 45 = 54.
Subtracting 45 from both sides of the equation gives x = 9.
Therefore, the student completed 9 courses worth 4 credits. Answer: \boxed{9}.