Answer
(a) The frequency of the sound as heard by Haruki is $522.7~Hz$
(b) The frequency of the sound that Junichi hears is $519.7~Hz$
Work Step by Step
(a) We can use the equation for the Doppler effect when the source is approaching:
$f_o = \left(\frac{v}{v-v_s}\right)~f_s$
$f_o = \left(\frac{343~m/s}{343~m/s-7.00~m/s}\right)~(512.0~Hz)$
$f_o = 522.7~Hz$
The frequency of the sound as heard by Haruki is $522.7~Hz$
(b) We can let $f_s = 522.7~Hz$. We can use the equation for the Doppler effect when the observer is moving away:
$f_o = \left(\frac{v-v_o}{v}\right)~f_s$
$f_o = \left(\frac{343~m/s-2.00~m/s}{343~m/s}\right)~(522.7~Hz)$
$f_o = 519.7~Hz$
The frequency of the sound that Junichi hears is $519.7~Hz$