The main formula for percentage calculations is:
I = P x R
P = Principal. The original number/value.
R = Rate. The percentage.
I = Interest. The part of the principal that is represented by the percentage.
So, if you want to get to the percentage (R) you use:
R = I/P
The principal in this case is the total of questions: 42 + 18 = 60
The interest is the 42 correct answers.
R = 42 / 60 = 0.7 = 70%