When to use which power equastions

i may be barking up the wrong tree here, but i have a question about an equation. we derived in class last week.

These two equations are for real and reactive power transfer of a transmission line.

A question to the group is, what happens if we have a resistance along with the line impedance? how does this impact the equation?

i ask because i ran across a problem where these equations would not work

I think maybe the question is worded wrong, because Zack mentioned this in class and on-demand review that people make mistakes when talking about power transfer and that alot of the equations actually calculate reactive power lost in the line. etc.

here is my attempts. the book solution circled in red is exactly how it is solved in the answer key.

I am wondering why the other formulas don’t work. Is it because we have a R and X? i even tried to use Z as the X value to no avail. Does anyone know why this is the case and how to handle an R with the X?