Multiply both sides of the usual equations by (1+r)n where r is the IRR in the case of the IRR equation, and r is the NPV discount rate in the case of the NPV equation. While the resulting equations are different from the original equations, a solution to the original equation will be a solution to the corresponding new equation.