what is the pH of a solution that has 12.2 grams of hydrochloric acid in 500 ml of water

mols = grams/molar mass. Solve for mols.

Then M = mols/L. Solve for M.
pH = -log(M)