OK, the versions match but since you are still getting that warning message then it means you haven't configured RTools properly.
Have you created the mentioned .Renviron file in your "Documents" folder? From the instructions instructions:
The easiest way to do so is create a text file .Renviron in your Documents folder which contains the following line:
PATH="${RTOOLS40_HOME}\usr\bin;${PATH}"