Solving Problems Involving Direct and Inverse Variation