multiply by 2sin[A] on both sides of cos[A]/a=sin[A]/b

you will have smthng roughly like this:

2sin[A] x cos[A]/a=2sin[A] x sin[A]/b

since,2sin[A].cos[A] is the formula of sin2[A],lets put sin2[A]

=>sin2[A]/a=2sin^2[A]/b

cross multiply:

bsin2[A]=a2sin^2[A]

from the formula cos2B=1-2sin^2B we can get 2sin^2B=1-cos2B lets put this on the RHS

bsin2[A]=a.(1-cos2[A])

open the bracket:

bsin2[A]=a-a.cos2[A]

=>bsin2[A]+acos2[A]=a

you can prove the same for 'b' by multiplying and dividing by 2cos[A]

hope it is helpful