Analysis of Acoustic Wave in Homogeneous and Inhomogeneous Media Using Finite Element Method