Like all "word" problems, you must try to put the information into expressions or equations prior to seeking a solution. In this problem you're having to figure out the number of correct answers to a total of 24 questions.
This means that the total of the of wrong answers PLUS right answers must be 24. Simply put r + w = 24 where r stands for right answers and w stands for wrong answers.
Now if Malcolm ends up with the same amount of money that he started with after ADDING 7 pennies for each right answer and SUBTRACTING 5 pennies for each wrong answer does this mean that 7*r LESS 5*w is zero? If it does then even if Malcolm began with $25 he will have $25 afterwards! So it really doesn't matter just how much he started with does it?
So now you have two equations and two unknowns and you should be able to solve for each.