If the sum of first n terms of an AP is An + Bn² where A and B are constants, then find the common difference of AP.
A. 3A
B. 2A
C. 2B
D. 4B