No
Sound waves can propagate only through a medium. The two given situations are not scientifically identical because the motion of an observer relative to a medium is different in the two situations. Hence, the Doppler formulas for the two situations cannot be the same.
In case of light waves, sound can travel in a vacuum. In a vacuum, the above two cases are identical because the speed of light is independent of the motion of the observer and the motion of the source. When light travels in a medium, the above two cases are not identical because the speed of light depends on the wavelength of the medium.