Two linear equations in formal power series