Image Reconstruction of the Speed of Sound and Initial Pressure Distributions in Ultrasound Computed Tomography and Photoacoustic Computed Tomography