Question 831327
For #1, I just solved the same exact problem.
See http://www.algebra.com/algebra/homework/Average/Average.faq.question.831317.html



For #2 question,
Let p be the number.  {{{highlight_green(p^2-(522+3*p)=126)}}}, the symbolic translation from the wording.  I leave it there for you to (1) Understand, and then (2) Solve for p.  You will want to use the general solution for the quadratic formula.