If #(r,theta)# is in polar form and #(x,y)# in Cartesian form the relation between them is as follows:
#x=rcostheta#, #y=rsintheta#, #r^2=x^2+y^2# and #tantheta=y/x#
Hence, #x+2y-4=0# can be written as
#rcostheta+2rsintheta-4=0# or
#r(costheta+2sintheta)=4# or
#r=4/(costheta+2sintheta)# .....(A)
Now let #tan^(-1)2=alpha# or #2=tanalpha=sinalpha/cosalpha#
Hence (A) becomes #r=4/(costheta+(sinalpha/cosalpha)sintheta)#
or #r=4cosalpha/(costhetacosalpha+sinalphasintheta)# or
#r=4cosalpha/cos(theta-alpha)#