I am trying different things and one can do this for more miles. I had on my return PTY-MIA-LAX but if one does PTY-MIA-SFO-LAX, it adds an extra 250 miles for MIA-SFO and approx 330 miles (500 minimum in some cases) for SFO-LAX.
One can stay up to 24 hrs in DFW or MIA if they are going to/from PTY. I have relatives near DFW so I am looking at that as a option. It may cost me approx 280 miles less but may be worth it for me.
I am sure the experts can come up with some nice routings.