What is expected of current mining equipment 2 years from now? I am curious if I buy a miner  today what good would be two years from now, will it still mine the same way and also still be profitable? Assuming that the difficulty factor is adjusted to the way that it mines.
Presumably you are asking about ASIC hardware as there is no sense in acquiring more GPU or FPGA hardware at this point in time.

There are always optimizations possible, so while the work performed by the miner hardware today will most likely still be a valid method two years from now there may be new approaches that make current mining hardware either incompatible with the new method, or of too low of performance to justify continuing to use it for mining.

As far as it being profitable, that cannot be answered.   Mining hardware profitability is determined by the difficulty level at intervals over time and the exchange rates -- neither of which can be known today.

Mining is a form of speculation on the Bitcoin exchange rate.