This is just rearranging terms, it gets kind of ugly though. Start by dividing both sides by a to get D/a=2+kt, next move the 2 over to the left to get (D/a)-2=kt, finally divide the whole expression by t to get ((D/a)-2)/t=k
You distribute the 30x to the equation in parenthesis
So basically you are doing (30x*x)+(30x*-3)
So you get 30x^2-90x
Hope this helps!
The expanded form is 500,000+4,000+40+7