Triangle DOG is an isosceles with base angles D and G. Line segment DO is one more than the square of a number, and line segment OG is two less than four times a number. Line segment DG is three less than twice the number. Find the number, the lengths of the legs, and the length of the base