Equations of Motion on a Ramp

List dependent variables

y[t]:=r[t]Cos[theta2[t]]
x[t]:=r[t]Sin[theta2[t]]

Find time derivatives

y''[t]:=D[D[y[t],t],t]
x''[t]:=D[D[x[t],t],t]
y''[t]
x''[t]

Sove for EoM

eqX=m2 x''[t]==-Ts Sin[theta2[t]]
eqY=m2 y''[t]==m2 g-Ts Cos[theta2[t]]
eqRT2=Solve[{eqX, eqY}, {r''[t], theta2''[t]}]

FullSimplify[eqRT2]

eqTs1=m1 r''[t]==Ts-m1 g Sin[theta1]
eqTs=Solve[eqTs1,Ts]

eqm=FullSimplify[eqRT2/.eqTs]

Solve[r''[t]==(r''[t]/.eqm),r''[t]]