How to find $p$ and $q$ if we have $\operatorname{lcm}(p,q)=b$ and $p+q=a$ where ($a,b \in \mathbb{N}$) and $p>q$. What is the general formula to find $p$ and $q$ if we have $\def\lcm{\operatorname{lcm}}\lcm (p,q)=b$ or $\gcd(p,q)$ and $p+q=a$ where ($a,b \in \mathbb N$) and $p>q$?
Example: $\lcm(p,q)=84$ and $p+q=54$ and $p>q$.
 A: We have $gcd(54,84)=6$, so we may write $p=6p', q=6q'$.  This satisfies $gcd(p',q')=1$, $p'+q'=9$, and $p'q'=14$.  By inspection we have $\{p',q'\}=\{2,7\}$; since $p>q$ we have $p'=7, q'=2$ so $p=42, q=12$.
In answer to the posted question, I will prove that $gcd(p,q)=gcd(p+q,lcm(p,q))$.  Proof by induction on the number of primes (by multiplicity) of $gcd(p+q,lcm(p,q))=s$.  Since $gcd(p,q)|s$, if $s=1$ the claim is true.  Otherwise, let $r$ be a prime dividing $s$.  It divides either $p$ or $q$ since it divides the lcm.  But also $r$ divides $p+q$, so it divides both $p$ and $q$.  Now divide $p,q$ by $r$.  This divides $s$ by $r$ as well, and we are done by the inductive hypothesis.
A: GCD problem:
If $gcd(p,q)=b$ and $p+q=a$ the problem is relatively easy, but the solution is not unique.
In this case, there is a solution if and only if $b |a$, and this case the problem reduces to finding $p',q'$ relatively prime such that $p'+q'=\frac{a}{b}$. Then $p=p'b, q=q'b$ are the solutions. 
A solution in this case is $p'=1, q'=\frac{a}{b}-1$ which leads to the solution $p=b, q=a-b$.
The exact number of solutions is the cardinality of 
$$\{ n | 1 \leq n \leq \frac{b}{a}, gcd (n, \frac{b}{a}-n)=1 \} \,.$$
LCM problem
Let $c=gcd(p,q)$. Then $p=c p', q=cq'$ and $gcd(p',q')=1$. We also have
$$b=cp'q'$$
and $a=cp'+cq'$.
So the problem reduces to solving 
$$b=cp'q'$$
$$a=cp'+cq'$$
and 
$$lcm(p',q')=1$$
Edit (instead of $c | gcd(a,b)$) As vadim's answer shows, we must have 
$$c = gcd(a,b) \,.$$
So the following is a simplification of vadim's answer using the old approach of this problem.
Indeed,  as $gcd(p',q')=1$ we get that no prime number can divide both $p'q'$ and $p'+q'$, thus $gcd(p'q', p'+q')=1$. This shows that 
$$gcd(a,b)=gcd(cp'q', cp'+cq')=c \,.$$ 
Thus the problem simply reduces to the following question:
Does the equation
$$x^2-\frac{a}{gcd(a,b)}x+\frac{b}{gcd(a,b)}=0$$
have relatively prime integer solutions.
In your example, $gcd(54, 84)=6$, which means we need to look to the following equations:
Does
$$x^2-9x+14=0$$
have integral relatively prime solutions?
