I am attaching the following links for your answers:
AOTC calculations
Lifetime Learning Tax Credit calculations