You can combinedly use TEXTJOIN()
and FILTERXML()
like below.
=AVERAGE(FILTERXML("<t><s>"&TEXTJOIN("</s><s>",TRUE,B2:J2)&"</s></t>","//s[position()>" & COUNTA(B2:J2)-3 &"]"))

- Here
"<t><s>"&TEXTJOIN("</s><s>",TRUE,B2:J2)&"</s></t>"
will construct a valid XML
string.
XPATH
parameter "//s[position()>" & COUNTA(B2:J2)-3 &"]"
will return last 3 nodes to calculate Average
by AVERAGE()
function.
COUNTA(B2:J2)-3
will detect how many nodes have before last 3 nodes so that we can return rest of nodes means always last 3 nodes by FILTERXML()
formula.
More about FILTERXML()
here by JvdV Extract substring(s) from string using FILTERXML
Edit: For google sheet you can use below formula.
=AVERAGE(FILTER(B2:J2,(COLUMN(B2:J2)-Column(A2))>IF(COUNTA(B2:J2)<=3,0,COUNTA(B2:J2)-3)))
"&TEXTJOIN("",,B2:J2)&"