Think about how you solve systems of algebraic equations. If you have three equations in three unknowns, say, x, y, and z. You would add or subtract a multiple of one equation from a multiple of another to eliminate one unknown at a time. In the first problem we have two "unknowns", A and B, we want to eliminate. So we need three equations! We already have one equation so we need two more. We get those by differentiating!
In the first problem you have
y=Aex+Be2x+21e−x. Since this has to do with differential equations, start by differentiating!
y′=Aex+2Be2x−21e−x
y′′=Aex+4Be2x+21e−x.
Now eliminate A and B from those three equations. The first thing I notice is that all three equations contain
Aex. Subtracting the y' equation from the y'' equation eliminates A:
y′′−y′=2Bex+e−x. Subtracting the y equation from the y'' equation also eliminates A: \(\displaystyle y''- y= 3Be^{2x}.
Now we have
y′′−y′=2Bex+e−x and
y′′−y=3Be2x. We can eliminate B by subtracting 3 times the first of those equations from 2 times the second.
3y′′−3y′−2y′′+2y=y′′−3y′+2y=3e−x
The second problem,
y2=4C(x+C)=4Cx+4C2 has only one constant so we only need one more equation. Differentiating,
2yy′=4C. Okay, it's a little harder to see how we can (elegantly) eliminate C from those two equations so I would try "brute force". From
2yy′=4C we have
C=2yy′. Replace C in the first equation by that:
y2=2xyy′+y2(y′)2.\)