In an aptitude test, 45% of candidates failed. If there were two more candidates who passed the test than those who failed, calculate the number of candidates who passed the test.

P=F+2

.45=F/(P+F)
put for F in the last equation P-2, and solve for P.