Gave my interpretation of the solution.
Note: If the required amount of previous months weren't available to calculate the specified running avg, I assigned the result as null; i.e. if you are in Feb, and only January is available as a prior month, we shouldn't be able to do (Jan+Feb/)2 as that's a 2-month running avg, so I'd assign Feb as a null. Correct me if this assumption is wrong! 🤓