Answer:
Vb = k Q / r     r <R
Vb = k q / R³ (R² - r²)   r >R
Explanation:
The electic potential is defined by
       ΔV = - ∫ E .ds
We calculate the potential in the line of the electric pipe, therefore the scalar product reduces the algebraic product
       VB - VA = - ∫ E dr
Let's substitute every equation they give us and we find out
r> R
      Va = - ∫ (k Q / r²) dr
      -Va = - k Q (- 1 / r)
We evaluate with it Va = 0 for r = infinity
     Vb = k Q / r     r <R
    Â
We perform the calculation of the power with the expression of the electric field that they give us
      Vb = - int (kQ / R3 r) dr
 We integrate and evaluate from the starting point r = R to the final point r <R
     Vb = ∫kq / R³ r dr
     Vb = k q / R³ (R² - r²)
This is the electric field in the whole space, the places of interest are r = 0, r = R and r = infinity