Solving for the first term and common ratio