P0174 indicatres that cylinder bank 2 (the bank with cylinder #2) is running lean (not enough fuel). The computer thinks this because it oxygen (O2) sensor sees that the exhaust stream contains more oxygen that than expected by the computer program.
It's possible that you have an exhaust leak upstream of the O2 sensor causing air to get in and cause a false "lean" reading.
It's possible that one or more of the injectors are not working properly or there could be an airleak into the intake on the bank 2 side, either of these two conditions would probably cause an increase in hydrocarbon emissions which could be a clue.
If you want a Mazda specialist, here's a directory link for you: