Question: sophisticated substitution

My actual problem is more complicated, but how do I get

     subs((x+1)^2 = a, (x+1)^6+2)

to look for transformations of the expression for which I'd like to substitute--

or

    subs((x+1)^2 = a, (x^2+2x+1)^3+2)

 

Perhaps this is just too much to expect.  Maple already blows my mind.  8-)

Please Wait...