exp=a+x^2+y^6;
rep={x->2+a,a->1};

exp/.rep

exp//.rep

f[a][b][c][d]//.g_[x_][y__]->g[x,y]