Assuming the problem is as you say, it is pretty much straight arithmetic: 7x7x7= 49x7= 343. If you now add 5 you get 348.
But when you say "divided by 7 times 7", that makes it sound like you mean "divided by 49". In fact, What is meant is to divide 349 by 7 and then multiply that by 7. That is, you want \(\displaystyle ((5+ 7^3)/7)(7)\) is the same as \(\displaystyle (5+ 7^3)(7/7)= (5+ 7^3)(1)= 5+ 7^3\)