The object must have a type, say T.
Each function has a type too; parameter types and return type.
Type T apparently has a member function T::method1(). No parameters, but some return type. Say U. U T::method1(), or in C++11 syntax auto T::method1() -> U.
Type U apparently has member function U::method2(). The call to T::method1() returns an unnamed temporary object of type U, so it is possible to call a member of that object.
If you have seen the code with that expression, then you should have access to the type definitions as well, and could backtrack every type.