The SQL below performs the requested operation. It averages days between the dates of the last three purchases, called here from A, B, C. A being the oldest of the three and C being the most recent of the three.
select
client_report_id,
datediff(dd,A,B) DIFF_A_B,
datediff(dd,B,C) DIFF_B_C,
(datediff(dd,A,B) + datediff(dd,B,C))/2 media,
A,
B,
C
from
(
SELECT
client_report_id,
max(case when rownum = 3 then received_date end) A,
max(case when rownum = 2 then received_date end) B,
max(case when rownum = 1 then received_date end) C
FROM
(
SELECT
ROW_NUMBER() OVER(PARTITION BY client_report_id ORDER BY client_report_id,received_date desc) AS rownum,
client_report_id,
received_date
FROM
receipt
) A
WHERE A.rownum IN (1,2,3)
group by client_report_id
) B
WHERE A IS NOT NULL AND B IS NOT NULL AND C IS NOT NULL
Note that this SQL performs the calculation for all bank records, not just a specific one, such as the one displayed in the question.
The return of it consists of the Customer ID and 6 fields. Required are just the client id and the media field. But I left the others to make clear the account being made.
In order for it to work, it is assumed that the customer has made at least 3 purchases. If it does less than that, then it will not appear.
See that although the table name and fields do not reflect that of the question, it is very simple to change it, since it is only one table (Receipt) and two fields (client_report_id and received_date).