Acid base question

an aqueous solution of sodium hydroxide has a pH of 12.544. calculate the molarity of this solution.
answer key: 0.035 M
I used the 10^-pH to find the answer. this only works if I calculate it by 14-12.544 then use the formula. is this how I should solve this question?

yes you need to do 14-12,544 because we use the formula 10^-pOH not pH since NaOH releases HO⁻ into the solution and not H30⁺