three times the number N less 13the number M

I think you mean

3N - 13M