解:如图,建立极坐标系,设B(ρ1,θ),其轨迹为ρ1=2acosθ.
设A(ρ2,θ),其轨迹为ρ2=2asinθ,设P(ρ,θ),则
ρ=(ρ1+ρ2)
=(2acosθ+2asinθ)
=a(cosθ+sinθ)
=asin(θ+).
∴点P的轨迹的极坐标方程为ρ=asin(θ+).