An Inverse Source Problem for a One-dimensional Wave Equation: An Observer-Based Approach